From 3695dde5d49537c778629deea565fd87400c4c83 Mon Sep 17 00:00:00 2001 From: Peter <61538034+PTKu@users.noreply.github.com> Date: Tue, 16 May 2023 06:23:42 +0200 Subject: [PATCH] fixes an issue where online type was assinged instead of POCO --- .../AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs | 4 ++-- src/AXSharp.compiler/src/ixc/Properties/launchSettings.json | 6 +++++- .../units/expected/.g/Onliners/class_generic_extension.g.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs index 29977a32..dbb2a1f7 100644 --- a/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs +++ b/src/AXSharp.compiler/src/AXSharp.Cs.Compiler/Onliner/CsOnlinerSourceBuilder.cs @@ -79,11 +79,11 @@ private string ReplaceGenericSignature(IClassDeclaration? classDeclaration) { if (attribute.GenericTypeAssignment.isPoco) { - genericSignature = genericSignature.Replace(genericType, $"Pocos.{fieldDeclaresGenericType?.Type.FullyQualifiedName}"); + genericSignature = genericSignature.Replace(attribute.GenericTypeAssignment.type, $"Pocos.{fieldDeclaresGenericType?.Type.FullyQualifiedName}"); } else { - genericSignature = genericSignature.Replace(genericType, fieldDeclaresGenericType?.Type.FullyQualifiedName); + genericSignature = genericSignature.Replace(attribute.GenericTypeAssignment.type, fieldDeclaresGenericType?.Type.FullyQualifiedName); } } } diff --git a/src/AXSharp.compiler/src/ixc/Properties/launchSettings.json b/src/AXSharp.compiler/src/ixc/Properties/launchSettings.json index 39e72c2e..d2dcbd3b 100644 --- a/src/AXSharp.compiler/src/ixc/Properties/launchSettings.json +++ b/src/AXSharp.compiler/src/ixc/Properties/launchSettings.json @@ -10,7 +10,11 @@ }, "ixc-simple-template": { "commandName": "Project", - "workingDirectory": "C:\\W\\Develop\\gh\\ix-ax\\ix.framework\\src\\templates.simple\\ctrl" + "workingDirectory": "C:\\W\\Develop\\gh\\ix-ax\\ix.framework\\src\\templates.simple\\ctrl\\" + }, + "ixc-template-ref": { + "commandName": "Project", + "workingDirectory": "C:\\W\\Develop\\gh\\ix-ax\\axopen\\src\\templates.simple\\ctrl" } } } \ No newline at end of file diff --git a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs index b779130e..a1ba6fe0 100644 --- a/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs +++ b/src/AXSharp.compiler/tests/AXSharp.Compiler.CsTests/samples/units/expected/.g/Onliners/class_generic_extension.g.cs @@ -249,7 +249,7 @@ public async Task> PlainToShadowAsync(Pocos.Generics } } - public partial class Extendee2 : Generics.Extender + public partial class Extendee2 : Generics.Extender { public Generics.SomeType SomeType { get; }