Skip to content
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

Issue error if top is used in a contract annotation #6429

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

mernst
Copy link
Member

@mernst mernst commented Jan 30, 2024

Merge atter #6432.

Copy link
Member

@smillst smillst left a comment

Choose a reason for hiding this comment

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

I still don't think these changes are right. I propose that I take over this pull request and make the changes I want.

}
}
}

// Check for type-system specific annotations. These are the annotations that are
Copy link
Member

Choose a reason for hiding this comment

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

It's strange that this code is reading the meta-annotations every time it encounters a declaration annotation rather than just when the checker is initialized. I want to rewrite this.

String methodString = " on method " + executableElement.getSimpleName();
factory
.getChecker()
.reportWarning(
Copy link
Member

Choose a reason for hiding this comment

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

Warnings should only be issued in the BaseTypeVisitor. Specifically, this code belongs in BaseTypeVisitor#checkContractsAtMethodDeclaration.

@smillst smillst assigned mernst and unassigned smillst Jan 30, 2024
@mernst
Copy link
Member Author

mernst commented Jan 30, 2024

OK, you can take over.

@mernst mernst assigned smillst and unassigned mernst Jan 30, 2024
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.

2 participants