-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pattern matcher does not generate ValDefs for defined pattern bound variables #190
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
Comments
@odersky can you please give a link to changed |
I was able to reproduce. Fix upcomming. |
DarkDimius
added a commit
to dotty-staging/dotty
that referenced
this issue
Oct 13, 2014
In scalac SubstOnlyTreeMakers were implemented using substitution, and didn't actually introduce new trees. Thus there was an optimization to remove them while generating code. This optimization led to scala#190. It is now removed.
There was an optimization not applicable to dotty left in Pattern Matcher. |
Fixed in #189 |
WojciechMazur
pushed a commit
to WojciechMazur/dotty
that referenced
this issue
May 8, 2025
Backport "Preserve hard unions in widenSingletons" to 3.3 LTS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When compiling pos/functions1.scala I observe the following code snippet
You need to compile against the latest commit with the changed functions1.scala or else compile with -uniqid to observe the effect: In both cases, the definition of the pattern bound variable x34 is missing.
Detected when trying to lambda-lift this code.
The text was updated successfully, but these errors were encountered: