Record with case

Issue #38 resolved
Daniel Roziecki created an issue

Plugin doesn't see case values from record

program test_record_case;

uses SysUtils;

type
  maritalStates = (single, married, widowed, divorced);
  ref_person = ^TPerson;
  TPerson = record
        (* CONSTANT PART *)
        (* of course records may be nested *)
    name: record
      first, middle, last: string;
    end;
    sex: (male, female);
        (* date of birth *)
    dob: TDateTime;
        (* VARIABLE PART *)
  case maritalStatus: maritalStates of
    single: ( );
    married, widowed: (marriageDate: TDateTime);
    divorced: (marriageDate, divorceDate: TDateTime;
    isFirstDivorce: boolean)
  end;

var
  ref_person: TPerson;
begin
  New(ref_person);
  ref_person.
end.

record_cae.png

maritalStatus is show as undeclared and doesn't exists in CodeCompletion table.

Regards

Daniel Roziecki

Comments (4)

  1. Log in to comment