This commit is contained in:
Mikhalkovich Stanislav 2020-06-30 16:52:28 +03:00
parent 913efed79b
commit c6cf3cbbb6
8 changed files with 63 additions and 6 deletions

View file

@ -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;

View file

@ -1,4 +1,4 @@
%MINOR%=6
%REVISION%=2543
%COREVERSION%=3
%REVISION%=2544
%MINOR%=6
%MAJOR%=3

View file

@ -1 +1 @@
3.6.3.2543
3.6.3.2544

View file

@ -1 +1 @@
!define VERSION '3.6.3.2543'
!define VERSION '3.6.3.2544'

View file

@ -1291,6 +1291,11 @@ namespace PascalABCCompiler.SyntaxTree
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)
{
foreach (var ntr in names.Split(',').Select(s => new named_type_reference(s)))

View 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.

View 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.

View file

@ -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