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

Extractor with default parameter causes compiler crash (assertion error) #4425

Closed
scabug opened this issue Mar 31, 2011 · 9 comments
Closed

Extractor with default parameter causes compiler crash (assertion error) #4425

scabug opened this issue Mar 31, 2011 · 9 comments

Comments

@scabug
Copy link

@scabug scabug commented Mar 31, 2011

File foo.scala:

object Foo {
  object X { def unapply(x : Int)(y : Option[Int] = None) = None }
  42 match { case _ X _ => () }
}

Trying to compile this with

scalac foo.scala

causes the compiler to crash with an assertion error:

error: java.lang.AssertionError: assertion failed: transformCaseApply: name = X tree = X / class scala.reflect.generic.Trees$$Ident
        at scala.Predef$$.assert(Predef.scala:100)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$2.apply$$mcV$$sp(RefChecks.scala:1400)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformCaseApply(RefChecks.scala:1235)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1398)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:823)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1420)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:871)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:871)
        at scala.collection.immutable.List.loop$$1(List.scala:117)
        at scala.collection.immutable.List.mapConserve(List.scala:133)
        at scala.tools.nsc.ast.Trees$$Transformer.transformCaseDefs(Trees.scala:871)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:809)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStat(RefChecks.scala:1100)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$$class.flatMap(TraversableLike.scala:266)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStats(RefChecks.scala:979)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:783)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.ast.Trees$$Transformer.transformTemplate(Trees.scala:861)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$2.apply(Trees.scala:753)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$2.apply(Trees.scala:752)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:885)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:751)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStat(RefChecks.scala:1021)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$$class.flatMap(TraversableLike.scala:266)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStats(RefChecks.scala:979)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:747)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:747)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:885)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:746)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.ast.Trees$$Transformer.transformUnit(Trees.scala:878)
        at scala.tools.nsc.transform.Transform$$Phase.apply(Transform.scala:30)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:326)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:326)
        at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:47)
        at scala.tools.nsc.Global$$GlobalPhase.applyPhase(Global.scala:326)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:294)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:294)
        at scala.collection.Iterator$$class.foreach(Iterator.scala:652)
        at scala.collection.mutable.ListBuffer$$$$anon$$1.foreach(ListBuffer.scala:311)
        at scala.tools.nsc.Global$$GlobalPhase.run(Global.scala:294)
        at scala.tools.nsc.Global$$Run.compileSources(Global.scala:896)
        at scala.tools.nsc.Global$$Run.compile(Global.scala:997)
        at scala.tools.nsc.Main$$.process(Main.scala:106)
        at scala.tools.nsc.Main$$.main(Main.scala:123)
        at scala.tools.nsc.Main.main(Main.scala)

Exception in thread "main" java.lang.AssertionError: assertion failed: transformCaseApply: name = X tree = X / class scala.reflect.generic.Trees$$Ident
        at scala.Predef$$.assert(Predef.scala:100)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$2.apply$$mcV$$sp(RefChecks.scala:1400)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformCaseApply(RefChecks.scala:1235)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1398)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:823)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1420)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:871)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:871)
        at scala.collection.immutable.List.loop$$1(List.scala:117)
        at scala.collection.immutable.List.mapConserve(List.scala:133)
        at scala.tools.nsc.ast.Trees$$Transformer.transformCaseDefs(Trees.scala:871)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:809)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStat(RefChecks.scala:1100)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$$class.flatMap(TraversableLike.scala:266)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStats(RefChecks.scala:979)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:783)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.ast.Trees$$Transformer.transformTemplate(Trees.scala:861)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$2.apply(Trees.scala:753)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$2.apply(Trees.scala:752)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:885)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:751)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStat(RefChecks.scala:1021)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer$$$$anonfun$$13.apply(RefChecks.scala:979)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.TraversableLike$$$$anonfun$$flatMap$$1.apply(TraversableLike.scala:266)
        at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$$class.flatMap(TraversableLike.scala:266)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transformStats(RefChecks.scala:979)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:747)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:747)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:885)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:746)
        at scala.tools.nsc.typechecker.RefChecks$$RefCheckTransformer.transform(RefChecks.scala:1424)
        at scala.tools.nsc.ast.Trees$$Transformer.transformUnit(Trees.scala:878)
        at scala.tools.nsc.transform.Transform$$Phase.apply(Transform.scala:30)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:326)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:326)
        at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:47)
        at scala.tools.nsc.Global$$GlobalPhase.applyPhase(Global.scala:326)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:294)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:294)
        at scala.collection.Iterator$$class.foreach(Iterator.scala:652)
        at scala.collection.mutable.ListBuffer$$$$anon$$1.foreach(ListBuffer.scala:311)
        at scala.tools.nsc.Global$$GlobalPhase.run(Global.scala:294)
        at scala.tools.nsc.Global$$Run.compileSources(Global.scala:896)
        at scala.tools.nsc.Global$$Run.compile(Global.scala:997)
        at scala.tools.nsc.Main$$.process(Main.scala:106)
        at scala.tools.nsc.Main$$.main(Main.scala:123)
        at scala.tools.nsc.Main.main(Main.scala)

This is the simplest such example I can find.

This certainly happens using the following:

  • Scala: Scala 2.9.0 RC1,
  • Java: 1.6.0_24-b07
  • Operating system: Gentoo Linux

It seems like the same problem also happens with Scala 2.8.1 final, with the following output:

TREE: X(_, _)
TREE: case X(_, _) => ()
TREE: 42 match {
  case X(_, _) => ()
}
TRANSFORM: foo.scala
TREE: java.lang.Object with ScalaObject {
  def this(): object Foo = {
    Foo.super.this();
    ()
  };
  final object X extends java.lang.Object with ScalaObject {
    <synthetic> def unapply$$default$$2(x: Int): Option[Int] @scala.annotation.unchecked.uncheckedVariance = scala.None;
    def this(): object Foo.X = {
      X.super.this();
      ()
    };
    def unapply(x: Int)(y: Option[Int] = scala.None): object None = scala.None
  };
  42 match {
    case X(_, _) => ()
  }
}
TRANSFORM: foo.scala
TREE: final object Foo extends java.lang.Object with ScalaObject {
  def this(): object Foo = {
    Foo.super.this();
    ()
  };
  final object X extends java.lang.Object with ScalaObject {
    <synthetic> def unapply$$default$$2(x: Int): Option[Int] @scala.annotation.unchecked.uncheckedVariance = scala.None;
    def this(): object Foo.X = {
      X.super.this();
      ()
    };
    def unapply(x: Int)(y: Option[Int] = scala.None): object None = scala.None
  };
  42 match {
    case X(_, _) => ()
  }
}
TRANSFORM: null
TREE: package <empty> {
  final object Foo extends java.lang.Object with ScalaObject {
    def this(): object Foo = {
      Foo.super.this();
      ()
    };
    final object X extends java.lang.Object with ScalaObject {
      <synthetic> def unapply$$default$$2(x: Int): Option[Int] @scala.annotation.unchecked.uncheckedVariance = scala.None;
      def this(): object Foo.X = {
        X.super.this();
        ()
      };
      def unapply(x: Int)(y: Option[Int] = scala.None): object None = scala.None
    };
    42 match {
      case X(_, _) => ()
    }
  }
}

Exception in thread "main" java.lang.AssertionError: assertion failed: X(_, _)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:227)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:779)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.transform(TypingTransformers.scala:53)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:234)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:863)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformCaseDefs$$1.apply(Trees.scala:863)
        at scala.collection.immutable.List.loop$$1(List.scala:115)
        at scala.collection.immutable.List.mapConserve(List.scala:132)
        at scala.tools.nsc.ast.Trees$$Transformer.transformCaseDefs(Trees.scala:863)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:801)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.transform(TypingTransformers.scala:53)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:234)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformTrees$$1.apply(Trees.scala:851)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformTrees$$1.apply(Trees.scala:851)
        at scala.collection.immutable.List.loop$$1(List.scala:115)
        at scala.collection.immutable.List.mapConserve(List.scala:132)
        at scala.tools.nsc.ast.Trees$$Transformer.transformTrees(Trees.scala:851)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer$$$$anonfun$$4.apply(SuperAccessors.scala:180)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer$$$$anonfun$$4.apply(SuperAccessors.scala:180)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:877)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:38)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:31)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.atOwner(SuperAccessors.scala:248)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:180)
        at scala.tools.nsc.ast.Trees$$Transformer.transformTemplate(Trees.scala:853)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$3.apply(Trees.scala:750)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$3.apply(Trees.scala:749)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:877)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:38)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:31)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.atOwner(SuperAccessors.scala:248)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:748)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.transform(TypingTransformers.scala:53)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:170)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformStats$$1.apply(Trees.scala:869)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transformStats$$1.apply(Trees.scala:867)
        at scala.collection.immutable.List.loop$$1(List.scala:115)
        at scala.collection.immutable.List.mapConserve(List.scala:132)
        at scala.tools.nsc.ast.Trees$$Transformer.transformStats(Trees.scala:867)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:739)
        at scala.tools.nsc.ast.Trees$$Transformer$$$$anonfun$$transform$$1.apply(Trees.scala:739)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:877)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:38)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:31)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.atOwner(SuperAccessors.scala:248)
        at scala.tools.nsc.ast.Trees$$Transformer.transform(Trees.scala:738)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.scala$$tools$$nsc$$transform$$TypingTransformers$$TypingTransformer$$$$super$$transform(TypingTransformers.scala:49)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer$$$$anonfun$$transform$$2.apply(TypingTransformers.scala:51)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer$$$$anonfun$$transform$$2.apply(TypingTransformers.scala:51)
        at scala.tools.nsc.ast.Trees$$Transformer.atOwner(Trees.scala:877)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:38)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.atOwner(TypingTransformers.scala:31)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.atOwner(SuperAccessors.scala:248)
        at scala.tools.nsc.transform.TypingTransformers$$TypingTransformer.transform(TypingTransformers.scala:51)
        at scala.tools.nsc.typechecker.SuperAccessors$$SuperAccTransformer.transform(SuperAccessors.scala:234)
        at scala.tools.nsc.ast.Trees$$Transformer.transformUnit(Trees.scala:870)
        at scala.tools.nsc.transform.Transform$$Phase.apply(Transform.scala:30)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:282)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:282)
        at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:48)
        at scala.tools.nsc.Global$$GlobalPhase.applyPhase(Global.scala:282)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:256)
        at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$run$$1.apply(Global.scala:256)
        at scala.collection.Iterator$$class.foreach(Iterator.scala:631)
        at scala.collection.mutable.ListBuffer$$$$anon$$1.foreach(ListBuffer.scala:304)
        at scala.tools.nsc.Global$$GlobalPhase.run(Global.scala:256)
        at scala.tools.nsc.Global$$Run.compileSources(Global.scala:741)
        at scala.tools.nsc.Global$$Run.compile(Global.scala:822)
        at scala.tools.nsc.Main$$.process(Main.scala:106)
        at scala.tools.nsc.Main$$.main(Main.scala:120)
        at scala.tools.nsc.Main.main(Main.scala)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 31, 2011

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 31, 2011

@paulp said:
Close to, but not quite a duplicate of, #3353.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 5, 2011

@lrytz said:
(In r24888) close #4524 and close #4425, review by odersky.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 10, 2012

@hubertp said:
When fixing this bug, please have a look also at:

object Foo {
  object X { def unapply(x : Int)(y: Int) = Some((2,2)) }
  42 match { case _ X _ => () }
}

which is related and currently gives this error message:

t4425_03.scala:3: error: error during expansion of this match (this is a scalac bug).
The underlying error was: value _1 is not a member of object Foo.X
  42 match { case _ X _ => () }
     ^
one error found
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jan 29, 2013

@adriaanm said:
Lukas, your half of the fix is probably the same as in #3353

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jan 31, 2013

@lrytz said:
After scala/scala#2043 the original example doesn't crash anymore but generates the same error as Hubert's example:

sandbox/t4425.scala:3: error: error during expansion of this match (this is a scalac bug).
The underlying error was: value _1 is not a member of object Foo.X
  42 match { case _ X _ => () }
     ^
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 14, 2013

@paulp said:
I am fixing this by designating as ineligible extractors with a second non-implicit parameter list.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 20, 2013

@paulp said:
35775a8fc8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.