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
duplicate 'part' statements should be flagged as errors explicitly #12735
Comments
Added this to the M7 milestone. |
Added Triaged label. |
Do we want to have a warning for this situation? As far as I can see there's nothing in the specification that disallows it, and as long as the part is empty there won't be any errors or warnings. If not, analyzer can provide a hint. Set owner to @gbracha. |
It's reasonable that importing the same file twice would be a warning...at a minimum. The big problem here: if someone inadvertently imports the same file twice, it's not obvious why the "already defined" error is being reported. A tough user experience. |
Removed Area-Analyzer label. |
Removed this from the 1.6 milestone. |
Removed Oldschool-Milestone-1.6 label. |
Better error messages would resolve the user experience issue. For example, stating what part directive, at what line, caused the duplicate declaration. I'm not convinced that we need more language rules rather than better tooling. Added Accepted label. |
This is now a static error raised by the analyzer:
|
At the moment, I'm getting "class Foo is already defined" in the duplicate part file.
Ideally, this warning would be in the library definition.
The text was updated successfully, but these errors were encountered: