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

SI-7984 Issue unchecked warning for type aliases #3161

Merged
merged 1 commit into from Nov 27, 2013

Conversation

retronym
Copy link
Member

The unchecked nature of the type test was already noticed,
but because the type alias tripped up in rendering a sensible
message CheckabilityChecker chose to remain silent, other
than under -Xdev.

This commit:

  • Dealiases pattern types before launching the CheckabilityChecker
  • Sharpens the error messages to explain that the dealiased type
    is the expansion of the alias.

@jozic
Copy link
Contributor

jozic commented Nov 19, 2013

that was fast ) thanks Jason!

@retronym
Copy link
Member Author

I'll fix the test failures tomorrow morning.

 - Dealias pattern types before launching the CheckabilityChecker
 - Sharpen the error messages to explain that the dealiased type
   is the expansion of the alias.
@retronym
Copy link
Member Author

Review by @adriaanm.

I'm tossing up whether or not to suppress the longer error messages (X[A] (underlying of Y[B])) for "direct" aliases like scala.Set. Probably should. I can't find existing code to check for such an alias, but I suppose it won't be too tricky to write.

@adriaanm
Copy link
Contributor

LGTM -- I don't know of any utility code lying around for detecting straight shot aliases

retronym added a commit that referenced this pull request Nov 27, 2013
 Issue unchecked warning for type aliases
@retronym retronym merged commit cb58334 into scala:master Nov 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants