-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[REVISIT] Dogfood value discard [ci: last-only] #10476
Conversation
dc2b2c6
to
efe0b16
Compare
43a230a
to
759a50b
Compare
One-legged if needs polish. Cannot just add unit value because that breaks tailrec. Given a choice of API, use the Unit-valued method. ( |
hopefully this is internal only
|
dd1c5d6
to
9917ce3
Compare
oh, actual warnings. It doesn't care because all it wants is a string.
|
The idea was that Then The desired analysis: a value was not used (as an input) to produce another value. (Out of scope here.) In that context, is it helpful (at all) to warn about It would be less noisy to treat |
c505fbb
to
411d2bb
Compare
411d2bb
to
99248e4
Compare
I was sampling some fresh dogfood, and just to spice it up, tweaked "unibranch if" under The override inference deserves refinement, as previously noted. By extraordinary coincidence, someone complained on twitter yesterday. @lrytz It doesn't faithfully infer the overridden signature (faithful to dotty behavior). To recap, dotty abandons "concrete overrides abstract" rule, and also infers a type from overridden symbols (plural). The puzzling example was that I had to annotate https://github.com/scala/scala/blob/2.13.x/src/compiler/scala/tools/nsc/backend/jvm/BTypes.scala#L39 https://github.com/lampepfl/dotty/blob/main/compiler/src/dotty/tools/backend/jvm/BTypes.scala#L39 |
I don't remember if there were any great lessons from the exercise, but it's clear that this is too heavily annotated (or the warning is too noisy for this code base). Glad to reopen if conditions improve. |
Inspired by Seth's branch. #10091
There were one or two actual bugs (
Imports.scala
,NodePrinters.scala
), a few improvements in expression. One test that didn't test anything.