This commit is contained in:
parent
02aae1768b
commit
a969d6de9c
21
TestSuite/lambdas23.pas
Normal file
21
TestSuite/lambdas23.pas
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
var j := 0;
|
||||||
|
type
|
||||||
|
t1 = class
|
||||||
|
|
||||||
|
static property prop1: integer read 1;
|
||||||
|
|
||||||
|
static constructor;
|
||||||
|
begin
|
||||||
|
var p := ()->
|
||||||
|
begin
|
||||||
|
j := prop1;
|
||||||
|
end;
|
||||||
|
p;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
var i := t1.prop1;
|
||||||
|
assert(j = 1);
|
||||||
|
end.
|
||||||
|
|
@ -275,6 +275,11 @@ namespace TreeConverter.LambdaExpressions.Closure
|
||||||
dn = new dot_node(getClassIdent(classField.cont_type),
|
dn = new dot_node(getClassIdent(classField.cont_type),
|
||||||
new ident(id.name, id.source_context), id.source_context);
|
new ident(id.name, id.source_context), id.source_context);
|
||||||
}
|
}
|
||||||
|
else if (si.sym_info is common_property_node cpn && cpn.polymorphic_state == polymorphic_state.ps_static)
|
||||||
|
{
|
||||||
|
dn = new dot_node(getClassIdent(cpn.common_comprehensive_type),
|
||||||
|
new ident(id.name, id.source_context), id.source_context);
|
||||||
|
}
|
||||||
else if (si.sym_info is class_constant_definition ccd)
|
else if (si.sym_info is class_constant_definition ccd)
|
||||||
{
|
{
|
||||||
dn = new dot_node(getClassIdent(ccd.comperehensive_type),
|
dn = new dot_node(getClassIdent(ccd.comperehensive_type),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue