You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- [E007] TypeMismatchError: ../dotty-test/upcast-rd.scala:11:38-------------11|defawaitA[C<: {cap.rd}](a: A^{C}) = a.await
|^|Found: (a : test.upcastrd.A^{C})
|Required: test.upcastrd.A^{cap.rd}
||where: cap is a fresh root capability created in method awaitA when checking argument to parameter a of method await
|| longer explanation available when compiling with`-explain`
Expectation
Should compile.
The text was updated successfully, but these errors were encountered:
[error] ./fut.scala:17:57
[error] Found: (f : test.fut.Future[T]^{futs*})
[error] Required: test.fut.Future[box T^?]^{cap.rd}
[error]
[error] where: cap is a fresh root capability created in anonymous function of type (f²: test.fut.Future[T]^{futs*}):T when checking argument to parameter fut of method await
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
May 19, 2025
Fixesscala#23170
This was disabled before. We also had to slightly extend fresh/cap collapsing
to make override checks go through under the new scheme.
Fixesscala#23170
This was disabled before. We also had to slightly extend fresh/cap collapsing
to make override checks go through under the new scheme.
Fixesscala#23170
This was disabled before. We also had to slightly extend fresh/cap collapsing
to make override checks go through under the new scheme.
Compiler version
Latest
main
(23469a1)Minimized code
Output
Expectation
Should compile.
The text was updated successfully, but these errors were encountered: