This commit is contained in:
Mikhalkovich Stanislav 2019-06-26 21:22:25 +03:00
parent 95a93215fb
commit cdd4e0447e
5 changed files with 32 additions and 8 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "5";
public const string Build = "0";
public const string Revision = "2153";
public const string Revision = "2155";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=5
%REVISION%=2153
%REVISION%=2155
%COREVERSION%=0
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.5.0.2153'
!define VERSION '3.5.0.2155'

View file

@ -0,0 +1,15 @@
type
t0<T> = class end;
t1 = class
function f1<T>(q: t0<T>) := default(T);
procedure p1<T>;
begin
var a: t0<T>;
var f: Func0<T> := ()->self.f1(a);
end;
end;
begin
end.

View file

@ -879,7 +879,7 @@ namespace TreeConverter.LambdaExpressions.Closure
{
var genericParameters = AllGenericParameters;
if (_visitor.context._ctn != null && _visitor.context._ctn.generic_params != null)
if (_visitor.context._ctn != null /* && _visitor.context._ctn.generic_params != null */)
{
var tr = upperField.vars_type as named_type_reference;
if (tr != null && tr.names != null && tr.names.Count == 1)
@ -891,10 +891,11 @@ namespace TreeConverter.LambdaExpressions.Closure
}
}
upperField.vars_type =
new template_type_reference(
(named_type_reference)upperField.vars_type,
new template_param_list(genericParameters.Select(l => SyntaxTreeBuilder.BuildSimpleType(l.name)).ToList()));
if (genericParameters.Count > 0)
upperField.vars_type = // SSM 26/06/19 - было вне if - поставил в if - #1947 - что-то легло. Оставил вне if
new template_type_reference(
(named_type_reference)upperField.vars_type,
new template_param_list(genericParameters.Select(l => SyntaxTreeBuilder.BuildSimpleType(l.name)).ToList()));
}
if (clDecl.Value.GeneratedVarStatementForScope != null)
@ -938,6 +939,14 @@ namespace TreeConverter.LambdaExpressions.Closure
}
}
private bool IsInGenericClass
{
get
{
return _visitor.context._ctn != null && _visitor.context._ctn.generic_params != null;
}
}
private List<ident> AllGenericParameters
{
get