This commit is contained in:
Ivan Bondarev 2022-05-08 11:02:24 +02:00
parent 653b7dfaae
commit 02f177d5ba
4 changed files with 32 additions and 2 deletions

View file

@ -4095,6 +4095,7 @@ namespace CodeCompletion
public bool is_final;
public bool aliased = false;
internal bool lazy_instance = false;
private static Dictionary<TypeScope, List<TypeScope>> instance_cache = new Dictionary<TypeScope, List<TypeScope>>();
public TypeScope() { }
public TypeScope(SymbolKind kind, SymScope topScope, SymScope baseScope)

View file

@ -67,6 +67,7 @@ namespace PascalABCCompiler.PCU
private SortedDictionary<int, common_type_node> interf_type_list = new SortedDictionary<int, common_type_node>();
private SortedDictionary<int, common_type_node> impl_type_list = new SortedDictionary<int, common_type_node>();
private Dictionary<common_method_node, int> waited_method_codes = new Dictionary<common_method_node, int>();
private bool waited_method_restoring = false;
internal static Dictionary<definition_node, int> AllReadOrWritedDefinitionNodesOffsets = new Dictionary<definition_node, int>();
internal void AddMember(definition_node dn, int offset)
{
@ -696,8 +697,10 @@ namespace PascalABCCompiler.PCU
public void RestoreWaitedMethodCodes()
{
waited_method_restoring = true;
foreach (common_method_node cmn in waited_method_codes.Keys)
cmn.function_code = GetCode(waited_method_codes[cmn]);
waited_method_restoring = false;
}
//получение кода метода
@ -1880,10 +1883,10 @@ namespace PascalABCCompiler.PCU
type_node type = GetTypeReference();
common_method_node get_meth = null;
if (br.ReadByte() == 1)
get_meth = GetClassMethod(br.ReadInt32(), true);
get_meth = GetClassMethod(br.ReadInt32(), !waited_method_restoring);
common_method_node set_meth = null;
if (br.ReadByte() == 1)
set_meth = GetClassMethod(br.ReadInt32(), true);
set_meth = GetClassMethod(br.ReadInt32(), !waited_method_restoring);
int num = br.ReadInt32();
parameter_list pl = new parameter_list();
for (int i = 0; i < num; i++)

View file

@ -0,0 +1,22 @@
unit u_records6;
type
// Обязательно запись - с классом не воспроизводится
t1 = record
// Обязательно свойство
property p1: byte read 0;
end;
t2 = class
// Обязательно свойство, использующее t1
property p2: word write
begin
var o: t1;
end;
end;
end.

View file

@ -0,0 +1,4 @@
uses u_records6;
begin
new t2;
end.