-
Notifications
You must be signed in to change notification settings - Fork 1.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
CapSet Type-Variable Bounds Crash the Capture Checker #22437
Comments
I had a look. The problem seems to be with This assertion seems a sanity check, and not essential for checking the wellformedness of capture sets. Given that the |
Fixes scala#22437 The check crashes the compiler when mapping over a capture variable in an upper bound of the form `CapSet^{C^}` as well as path captures in function signatures. See the test `capture-vars-subtyping2.scala` for examples.
The current |
It does work when we remove the Edit: I left the check in place, and instead skip it only for type and term refs that have no info. |
The check crashes the compiler when mapping over a capture variable in a type bound bound of the form CapSet^{C^} as well as path captures in function signatures. See the test capture-vars-subtyping2.scala for examples.
Compiler version
Latest nightly
Minimized code
With the recents improvements involving capture variables, we now have two ways to write down a capture variable's bounds, e.g.,
C
's bound can also be written as simply<: B
. However, with the bound<: CapSet^{B^}
the setup phase of the capture checker crashes whileexecuting the
integrateRT
method.It would be nice to support the
CapSet^{B^}
notation, since one expectsto be able to provide a non-singleton bound, e.g.,
C <: CapSet^{a,b,c}
.Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: