Skip to content

Scalac crashes when accessing private companion object in a matcher in cps context #6585

Closed
@scabug

Description

@scabug

This code works on Scala 2.9.2 and 2.10.0-M2, and crashes from 2.10.0-M3 to 2.10.0-RC1

import scala.util.continuations._

private object Foo {
  private class Bar
}

class Foo {
  import Foo.Bar

  private def bad(): Bar @suspendable = {
    "baz" match {
      case _ =>
        shift { (continue: Bar => Unit) => }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions