bug fix #437
This commit is contained in:
parent
485d6b4445
commit
078ff0b6ee
13
TestSuite/lambda_closure_class_fields_5.pas
Normal file
13
TestSuite/lambda_closure_class_fields_5.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
type TClass = class
|
||||
class i: integer := 2;
|
||||
|
||||
class constructor Create;
|
||||
begin
|
||||
var lmb: integer -> integer := x -> i;
|
||||
assert(lmb(2) = 2);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
var obj := new TClass;
|
||||
end.
|
||||
|
|
@ -179,7 +179,7 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
return;
|
||||
}
|
||||
|
||||
if (si.sym_info.semantic_node_type == semantic_node_type.class_field && InLambdaContext)
|
||||
/*if (si.sym_info.semantic_node_type == semantic_node_type.class_field && InLambdaContext)
|
||||
{
|
||||
var semClassField = (class_field)si.sym_info;
|
||||
if (semClassField.polymorphic_state != polymorphic_state.ps_common)
|
||||
|
|
@ -187,7 +187,7 @@ namespace TreeConverter.LambdaExpressions.Closure
|
|||
_visitor.AddError(new ThisTypeOfVariablesCannotBeCaptured(_visitor.get_location(id)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (si.scope == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue