fix #2199
This commit is contained in:
parent
913efed79b
commit
c6cf3cbbb6
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
||||||
public const string Major = "3";
|
public const string Major = "3";
|
||||||
public const string Minor = "6";
|
public const string Minor = "6";
|
||||||
public const string Build = "3";
|
public const string Build = "3";
|
||||||
public const string Revision = "2543";
|
public const string Revision = "2544";
|
||||||
|
|
||||||
public const string MainVersion = Major + "." + Minor;
|
public const string MainVersion = Major + "." + Minor;
|
||||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%MINOR%=6
|
|
||||||
%REVISION%=2543
|
|
||||||
%COREVERSION%=3
|
%COREVERSION%=3
|
||||||
|
%REVISION%=2544
|
||||||
|
%MINOR%=6
|
||||||
%MAJOR%=3
|
%MAJOR%=3
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
3.6.3.2543
|
3.6.3.2544
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
!define VERSION '3.6.3.2543'
|
!define VERSION '3.6.3.2544'
|
||||||
|
|
|
||||||
|
|
@ -1291,6 +1291,11 @@ namespace PascalABCCompiler.SyntaxTree
|
||||||
|
|
||||||
public partial class template_param_list
|
public partial class template_param_list
|
||||||
{
|
{
|
||||||
|
public template_param_list(IEnumerable<string> names)
|
||||||
|
{
|
||||||
|
foreach (var s in names)
|
||||||
|
Add(new named_type_reference(s));
|
||||||
|
}
|
||||||
public template_param_list(string names)
|
public template_param_list(string names)
|
||||||
{
|
{
|
||||||
foreach (var ntr in names.Split(',').Select(s => new named_type_reference(s)))
|
foreach (var ntr in names.Split(',').Select(s => new named_type_reference(s)))
|
||||||
|
|
|
||||||
25
TestSuite/StaticInLam2.pas
Normal file
25
TestSuite/StaticInLam2.pas
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
//#2199
|
||||||
|
type
|
||||||
|
t0<T2> = class
|
||||||
|
static function p1 := 33;
|
||||||
|
end;
|
||||||
|
|
||||||
|
t2 = class(t0<integer>)
|
||||||
|
procedure ppp;
|
||||||
|
begin
|
||||||
|
Assert(t0&<integer>.p1=33);
|
||||||
|
Assert(p1=33);
|
||||||
|
Assert(t2.p1=33);
|
||||||
|
var p: ()->() := ()->
|
||||||
|
begin
|
||||||
|
Assert(t0&<integer>.p1=33);
|
||||||
|
Assert(p1=33);
|
||||||
|
Assert(t2.p1=33);
|
||||||
|
end;
|
||||||
|
p();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
t2.Create.ppp;
|
||||||
|
end.
|
||||||
27
TestSuite/StaticInLam3.pas
Normal file
27
TestSuite/StaticInLam3.pas
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
//#2199
|
||||||
|
type
|
||||||
|
t0<TTTT1,TTTT2> = class
|
||||||
|
static function p1 := 33;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TGen1 = class end;
|
||||||
|
TGen2 = class end;
|
||||||
|
t2 = class(t0<TGen1,TGen2>)
|
||||||
|
constructor;
|
||||||
|
begin
|
||||||
|
Assert(t0&<integer,integer>.p1=33);
|
||||||
|
Assert(p1=33);
|
||||||
|
Assert(t2.p1=33);
|
||||||
|
var p: ()->() := ()->
|
||||||
|
begin
|
||||||
|
Assert(t0&<integer,integer>.p1=33);
|
||||||
|
Assert(p1=33);
|
||||||
|
Assert(t2.p1=33);
|
||||||
|
end;
|
||||||
|
p();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
t2.Create;
|
||||||
|
end.
|
||||||
|
|
@ -223,7 +223,7 @@ namespace TreeConverter.LambdaExpressions.Closure
|
||||||
if (classNode.name.Contains("<"))
|
if (classNode.name.Contains("<"))
|
||||||
{
|
{
|
||||||
var classIdent = new ident(classNode.name.Remove(classNode.name.IndexOf("<")));
|
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);
|
return new ident_with_templateparams(classIdent, templateParams);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue