-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unnecessary boxing when calling > on complex int type #15405
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
Labels
Milestone
Comments
Minimizationtype Validated[A] = A
def foo(v: Int|Validated[Int]): Unit = v > 43 ProblemEven though the type of type Validated[A >: Nothing <: Any] = A
def foo(v: Int | Validated[Int]): Unit = {
intWrapper(v).>(43)
()
} This is the source of the boxing as the operation will erase into Note that |
Workaround- val v = r.read
+ val v: Int = r.read |
anatoliykmetyuk
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 10, 2022
anatoliykmetyuk
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 10, 2022
anatoliykmetyuk
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 14, 2022
odersky
added a commit
that referenced
this issue
Jun 15, 2022
Fix #15405: Dealias Or type constituents when finding its dominator
bishabosha
pushed a commit
to dotty-staging/dotty
that referenced
this issue
Oct 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.1.2
Minimized code
Output
Expectation
The text was updated successfully, but these errors were encountered: