This commit is contained in:
Бондарев Иван 2019-06-02 12:19:18 +02:00
parent 1d9a27d08a
commit 240dfde02f
3 changed files with 17 additions and 1 deletions

Binary file not shown.

View file

@ -0,0 +1,10 @@
{$reference lib.dll}
procedure p1;
begin
var r: lib.r1; // запись обязательно из библиотеки
var p: ^char;
r.p := p; // обязательно присвоить полю значение переменной. если присваивать nil - не воспроизводится
end;
begin end.

View file

@ -1057,7 +1057,13 @@ namespace PascalABCCompiler.TreeRealization
}
if (rtn == null)
{
return null;
if (ctn is compiled_type_node && (ctn as compiled_type_node).compiled_type.IsPointer)
{
if (this.pointed_type == compiled_type_node.get_type_node((ctn as compiled_type_node).compiled_type.GetElementType()))
return PascalABCCompiler.TreeConverter.convertion_data_and_alghoritms.get_empty_conversion(this, ctn, false);
return get_implicit_conversion_to(new ref_type_node(compiled_type_node.get_type_node((ctn as compiled_type_node).compiled_type.GetElementType())));
}
return null;
}
if (rtn.pointed_type == null || this.pointed_type == null)
return null;