Skip to content

Bug: explicit type declaration is not recorded #220

Description

@JBontes

The following two code lines register exactly the same:

type
  x = type integer;
  y = integer;

This is incorrect. The explicit type declaration should be recorded.
The following changes fix this issue:

TPasSyntaxTreeBuilder = class(TmwSimplePasPar)
  ...
      procedure ExplicitType; override;
  ...

type
  TAttributeValue = (atAsm, atTrue, atFunction, atProcedure, atClassOf, atClass,
    atConst, atConstructor, atDestructor, atEnum, atInterface, atNil, atNumeric,
    atOut, atPointer, atName, atString, atSubRange, atVar, atType{ExplicitType});

procedure TPasSyntaxTreeBuilder.ExplicitType;
begin
  inherited;
  FStack.Peek.SetAttribute(anKind, AttributeValues[atType]);
end;

end;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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