Finished node immutability

This commit is contained in:
Michael Schimmel
2025-11-05 18:33:29 +01:00
parent 1f0eef7698
commit 5003cfd899
5 changed files with 71 additions and 80 deletions
+2 -4
View File
@@ -540,8 +540,7 @@ begin
begin
def := TScalarRecordRegistry.Intern(scalarDefFields);
staticType := TTypes.CreateRecord(def);
Result := TRecordLiteralNode.Create(newFields, staticType);
(Result as TRecordLiteralNode).Definition := def;
Result := TAst.RecordLiteral(newFields, def, nil, staticType);
end
else
begin
@@ -552,8 +551,7 @@ begin
var genDef := TGenericRecordRegistry.Intern(genDefFields);
staticType := TTypes.CreateGenericRecord(genDef);
Result := TGenericRecordLiteralNode.Create(newFields, staticType);
(Result as TGenericRecordLiteralNode).GenericDefinition := genDef;
Result := TAst.RecordLiteral(newFields, nil, genDef, staticType);
end;
end;