-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix implicit conversion warnings #5886
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
Fix implicit conversion warnings #5886
Conversation
We need that for pretty printing, and generally, to distinguish the two styles for implicits.
Align with usage elsewhere where a flag name normally applies to both terms and types, and is qualified with Term or Type if we want only one half.
I get it that `toMessage` will give a more precise error message. But that's no reason to hide the message obtained from `getMessage` completely.
Interpretation of what `implied` means is still missing.
Implied imports can only import implied definitions. Regular imports can only import non-implied definitions.
The change of Implicit to be a common flag now caused some breakage, which this commit fixes.
Add implied import entry to sidebar
Implement feature warnings for implicit conversion use according to scala#4229 also for new style implicit conversions. Change the doc comment for languge.implicitConversion to explain why it is needed for use site conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Commit Messages
We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).
Please stick to these guidelines for commit messages:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Add" instead of "Added")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
Note that we enable |
@smarter Let's drop -language:implicitConversions once we have full bootstrap. That's a good occasion to validate whether our warning criteria make sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, LGTM
checkFeature(defn.LanguageModuleClass, nme.implicitConversions, | ||
i"Use of implicit conversion ${conv.showLocated}", NoSymbol, posd.sourcePos) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
symToShow
and clsSyms
are not used.
Implement feature warnings for implicit conversion use according to #4229
also for new style implicit conversions.
Change the doc comment for language.implicitConversion to explain why it is
needed for use site conversions.
Based on #5868