#2377 sample 1
This commit is contained in:
parent
086e75f8e7
commit
cd1585fead
21
TestSuite/records19.pas
Normal file
21
TestSuite/records19.pas
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
var i: integer;
|
||||
|
||||
type
|
||||
r1 = record
|
||||
public function InitI1:integer;
|
||||
begin
|
||||
Result := 1;
|
||||
Inc(i);
|
||||
end;
|
||||
|
||||
public i1: integer := InitI1;
|
||||
public i2: integer;
|
||||
|
||||
end;
|
||||
|
||||
function f1 := default(r1);
|
||||
|
||||
begin
|
||||
var a := f1;
|
||||
assert(i = 1);
|
||||
end.
|
||||
|
|
@ -2129,7 +2129,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
{
|
||||
lbvr.type = SystemLibrary.SystemLibInitializer.TypedSetType.sym_info as type_node;
|
||||
}
|
||||
if (vdn.type.is_value_type && userInitalValue is common_constructor_call)
|
||||
if (vdn.type.is_value_type /*&& userInitalValue is common_constructor_call*/)
|
||||
{
|
||||
return new default_operator_node(vdn.type, lid);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue