bug fix #1929
This commit is contained in:
parent
1d9a27d08a
commit
240dfde02f
BIN
TestSuite/CompilationSamples/lib.dll
Normal file
BIN
TestSuite/CompilationSamples/lib.dll
Normal file
Binary file not shown.
10
TestSuite/CompilationSamples/xpointers_in_dll.pas
Normal file
10
TestSuite/CompilationSamples/xpointers_in_dll.pas
Normal 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.
|
||||||
|
|
@ -1057,7 +1057,13 @@ namespace PascalABCCompiler.TreeRealization
|
||||||
}
|
}
|
||||||
if (rtn == null)
|
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)
|
if (rtn.pointed_type == null || this.pointed_type == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue