Skip to content

type not found for array of anonymous record #6

@User4martin

Description

@User4martin

Run to "write" line

(pdr) print x
[ERROR] <error: element type not found>
program project1; {$Mode objfpc}
type
  TRec = array of record
    a: byte;
  end;
var x : TRec;

begin
  SetLength(x,2);
  x[0].a := 12;
  write(x[0].a);
end.

Same for

(pdr) print x
X = TRec { a: 12, b: <error: type not found> }
program project1; {$Mode objfpc}
type
  TRec = record
    a: byte;
    b: record
      c: word;
    end;
  end;
var x : TRec;

begin
  x.a := 12;
  x.b.c := 11;
  write(x.a);
end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions