This commit is contained in:
Mikhalkovich Stanislav 2019-06-10 22:33:51 +03:00
parent 0d31b9bc77
commit 99882270d0
5 changed files with 22 additions and 5 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 = "2096";
public const string Revision = "2098";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=2096
%REVISION%=2098
%MINOR%=5
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.5.0.2096'
!define VERSION '3.5.0.2098'

View file

@ -0,0 +1,17 @@
type
t1<T>=class
procedure p1();
var t2: integer := 2;
begin
var p: procedure := ()->
begin
Assert(t2=2);
end;
p;
end;
end;
begin
T1&<integer>.Create.p1;
end.

View file

@ -242,13 +242,13 @@ namespace TreeConverter.LambdaExpressions.Closure
var prScope = scope as CapturedVariablesTreeNodeProcedureScope;
if (prScope != null && acceptableVarType)
{
if (si.sym_info.semantic_node_type == semantic_node_type.local_variable)
/*if (si.sym_info.semantic_node_type == semantic_node_type.local_variable)
{
if (!(idName == compiler_string_consts.self_word && si.scope is SymbolTable.ClassMethodScope && _classScope != null) && InLambdaContext)
{
_visitor.AddError(new ThisTypeOfVariablesCannotBeCaptured(_visitor.get_location(id)));
}
}
}*/
if (si.sym_info.semantic_node_type == semantic_node_type.common_parameter && prScope.FunctionNode.parameters.First(v => v.name.ToLower() == idName).parameter_type != parameter_type.value && InLambdaContext)
{
_visitor.AddError(new CannotCaptureNonValueParameters(_visitor.get_location(id)));