Skip to content

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Apr 21, 2021

Section 'Class Member Conflicts' specifies several conflicts (we can't have a method and a setter with the same basename, etc), but similar rules are missing for top-level declarations.

Only one of these rules is relevant (there are no top-level constructors so we can't have a conflict at the top level involving a constructor, etc.): It is an error to have a setter with basename n together with any other declaration with basename n, except when that other declaration is a getter.

This PR adds that rule.

Update: The rule in 'Class Member Conflicts' about setter/method conflicts was a bit vague: It referred to "member" with the intent that it should cover both static and instance members. It is now split into two sentences where one says 'the interface of $C$ contains an instance member' respectively '$C$ declares a static member'. The static/instance and instance/static cases are already covered by the previous sentence.

There is no associated implementation work, this behavior is already implemented.

@eernstg eernstg requested a review from lrhn April 21, 2021 12:18
Copy link
Member Author

@eernstg eernstg left a comment

Choose a reason for hiding this comment

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

Thanks! Some changes were made in response to the review.

@eernstg eernstg merged commit 537119a into master Apr 21, 2021
@kevmoo kevmoo deleted the specify_top_method_setter_conflict_apr21 branch April 21, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants