diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 14a7e163d..934cea9f4 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "6"; public const string Build = "3"; - public const string Revision = "2543"; + public const string Revision = "2544"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 897f64a13..7efe331c5 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=6 -%REVISION%=2543 %COREVERSION%=3 +%REVISION%=2544 +%MINOR%=6 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index e5884c785..bcc711be3 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.3.2543 +3.6.3.2544 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 44bdf791f..b94b464cc 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.3.2543' +!define VERSION '3.6.3.2544' diff --git a/SyntaxTree/tree/TreeHelper.cs b/SyntaxTree/tree/TreeHelper.cs index bc086a691..99955a28e 100644 --- a/SyntaxTree/tree/TreeHelper.cs +++ b/SyntaxTree/tree/TreeHelper.cs @@ -1291,6 +1291,11 @@ namespace PascalABCCompiler.SyntaxTree public partial class template_param_list { + public template_param_list(IEnumerable names) + { + foreach (var s in names) + Add(new named_type_reference(s)); + } public template_param_list(string names) { foreach (var ntr in names.Split(',').Select(s => new named_type_reference(s))) diff --git a/TestSuite/StaticInLam2.pas b/TestSuite/StaticInLam2.pas new file mode 100644 index 000000000..e3b22a649 --- /dev/null +++ b/TestSuite/StaticInLam2.pas @@ -0,0 +1,25 @@ +//#2199 +type + t0 = class + static function p1 := 33; + end; + + t2 = class(t0) + procedure ppp; + begin + Assert(t0&.p1=33); + Assert(p1=33); + Assert(t2.p1=33); + var p: ()->() := ()-> + begin + Assert(t0&.p1=33); + Assert(p1=33); + Assert(t2.p1=33); + end; + p(); + end; + end; + +begin + t2.Create.ppp; +end. \ No newline at end of file diff --git a/TestSuite/StaticInLam3.pas b/TestSuite/StaticInLam3.pas new file mode 100644 index 000000000..315940e2c --- /dev/null +++ b/TestSuite/StaticInLam3.pas @@ -0,0 +1,27 @@ +//#2199 +type + t0 = class + static function p1 := 33; + end; + + TGen1 = class end; + TGen2 = class end; + t2 = class(t0) + constructor; + begin + Assert(t0&.p1=33); + Assert(p1=33); + Assert(t2.p1=33); + var p: ()->() := ()-> + begin + Assert(t0&.p1=33); + Assert(p1=33); + Assert(t2.p1=33); + end; + p(); + end; + end; + +begin + t2.Create; +end. \ No newline at end of file diff --git a/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs b/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs index b63ac1065..f3675450b 100644 --- a/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs +++ b/TreeConverter/LambdaExpressions/Closure/CapturedVariablesTreeBuilder.cs @@ -223,7 +223,7 @@ namespace TreeConverter.LambdaExpressions.Closure if (classNode.name.Contains("<")) { var classIdent = new ident(classNode.name.Remove(classNode.name.IndexOf("<"))); - var templateParams = new template_param_list(classNode.instance_params.Select(x => x.name).Aggregate("", (acc, elem) => acc += elem)); + var templateParams = new template_param_list(classNode.instance_params.Select(x => x.name)/*.Aggregate("", (acc, elem) => acc += elem)*/); return new ident_with_templateparams(classIdent, templateParams); } else