Skip to content

Revise duplicate diagnostics logic #14845

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 5, 2022
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 4, 2022

The logic that hid duplicate messages was fragile and overly aggressive.

  • Because of mixin ordering, it could be that a non-sensical message that was
    in the end not reported could prevent a message at overlapping positions
    to be hidden. This could mean that no errors at all were reported even
    through the program was erroneous.
  • A message that ended up to be hidden since it overlapped with another message
    could still hide further messages with which it overlapped as well.

Fixing the logic meant that some tests have more error messages reported.

Fixes #14834
Fixes #12457

The logic that hid duplicate messages was fragile and overly aggressive.

 - Because of mixin ordering, it could be that a non-sensical message that was
   in the end not reported could prevent a message at overlapping positions
   to be hidden. This could mean that no errors at all were reported even
   through the program was erroneous.
 - A message that ended up to be hidden since it overlapped with another message
   could still hide further messages with which it overlapped as well.

Fixing the logic meant that some tests have more error messages reported.

Fixes scala#14834
Fixes scala#12457
@odersky odersky requested a review from dwijnand April 4, 2022 20:49
@odersky odersky merged commit 95bae7d into scala:main Apr 5, 2022
@odersky odersky deleted the fix-14834 branch April 5, 2022 07:31
@Kordyjan Kordyjan added this to the 3.1.3 milestone Aug 1, 2023
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.

UnAssignedTypeException: mutual type alias references ICE: dotty.tools.dotc.ast.Trees$UnAssignedTypeException: type of Ident(R) is not assigned
3 participants