Skip to content
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

Instantiating abstract types bounded by CapSet with Nothing crashes the capture checker #21868

Closed
bracevac opened this issue Oct 31, 2024 · 0 comments · Fixed by #21875
Closed
Assignees
Milestone

Comments

@bracevac
Copy link
Contributor

Compiler version

Latest nightly.

Minimized code

import language.experimental.captureChecking
import caps._

trait Abstract:
    type C <: CapSet
    def boom(): Unit^{this.C^}

class Concrete extends Abstract:
    type C = Nothing
    def boom() = () // dotty.tools.dotc.cc.IllegalCaptureRef: Nothing

Output

The compiler crashes with dotty.tools.dotc.cc.IllegalCaptureRef: Nothing.

@bracevac bracevac added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label area:experimental:cc Capture checking related and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Oct 31, 2024
@bracevac bracevac self-assigned this Oct 31, 2024
@WojciechMazur WojciechMazur added this to the 3.6.3 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants