Skip to content

Fix analysis errors around type of types #363

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2025
Merged

Fix analysis errors around type of types #363

merged 1 commit into from
Apr 17, 2025

Conversation

Cirras
Copy link
Collaborator

@Cirras Cirras commented Apr 14, 2025

This PR:

  • fixes the ClassCastException in TypeOfTypeNode::createType
  • models the type as a class reference type (like class of)

Fixes #361.

@Cirras Cirras requested a review from fourls April 14, 2025 00:54
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the most part.

@@ -35,9 +36,19 @@ public <T> T accept(DelphiParserVisitor<T> visitor, T data) {
return visitor.visit(this, data);
}

@Override
public TypeReferenceNode getTypeOfTypeNode() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be getTypeReferenceNode? Isn't this the type of type node?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this is confusing. The naming was intended to be symmetrical with ClassReferenceNode::getClassOfTypeNode, but that's not especially important.

Let's go with getTypeReferenceNode.

@Cirras
Copy link
Collaborator Author

Cirras commented Apr 17, 2025

Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I'm not going to worry about the ITs.

@fourls fourls merged commit 7bd1b21 into master Apr 17, 2025
3 of 6 checks passed
@fourls fourls deleted the typeof branch April 17, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execution failure on "type of ..." declarations
2 participants