Skip to content

Compiler panic "?C should be a concrete capture set in this phase."Β #1289

@marvinborner

Description

@marvinborner

In some larger code base I got the following panic:

[error] ?C should be a concrete capture set in this phase.
[info]   at effekt.util.messages$CompilerPanic$.apply(Messages.scala:37)
[info]   at effekt.util.messages$ErrorReporter.panic(Messages.scala:118)
[info]   at effekt.util.messages$ErrorReporter.panic$(Messages.scala:99)
[info]   at effekt.context.Context.panic(Context.scala:41)
[info]   at effekt.util.messages$ErrorReporter.panic(Messages.scala:119)
[info]   at effekt.core.Transformer$.transform(Transformer.scala:861)
[info]   at effekt.core.Transformer$.transform(Transformer.scala:835)
[info]   at effekt.core.Transformer$.coercing$$anonfun$2(Transformer.scala:911)
[info]   at effekt.core.Transformer$.$anonfun$65(Transformer.scala:828)
[info]   at effekt.core.TransformerOps.withBindings$$anonfun$1(Transformer.scala:986)
[info]   at effekt.context.ContextOps.in(Context.scala:31)
[info]   at effekt.context.ContextOps.in$(Context.scala:17)
[info]   at effekt.context.Context.effekt$namer$NamerOps$$super$in(Context.scala:41)
[info]   at effekt.namer.NamerOps.in(Namer.scala:979)
[info]   at effekt.namer.NamerOps.in$(Namer.scala:961)
...

I minimized the responsible code to the following:

effect break(): => Int at {}

def main() = {
  try do break()
  with break { resume(42 match {
    case 42 => box { 42 }
    case _ => panic("whaa")
  }) }
  ()
}

Not sure if this is even supposed to work, but we should catch this in earlier phases either way.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions