Skip to content

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

Closed
@bracevac

Description

@bracevac

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions