mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-10 19:41:37 +01:00
pointer->array type conversion implies an implicit dereference operation
(mantis #25622)
git-svn-id: trunk@26608 -
24 lines
357 B
ObjectPascal
24 lines
357 B
ObjectPascal
{ %fail }
|
|
|
|
{$mode delphi}
|
|
|
|
program test;
|
|
|
|
type
|
|
PArray = ^TArray;
|
|
TArray = array[1..sizeof(ptrint)] of byte;
|
|
|
|
function TestA(): Pointer;
|
|
begin
|
|
Result := nil;
|
|
end;
|
|
|
|
function TestB(): PArray;
|
|
begin
|
|
// can't take address of function return value, but compiler instead says "Internal error 2006111510"
|
|
Result := @TArray(TestA());
|
|
end;
|
|
|
|
begin
|
|
end.
|