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

object extends companion class in trait: crash #3994

Closed
scabug opened this issue Nov 12, 2010 · 4 comments
Closed

object extends companion class in trait: crash #3994

scabug opened this issue Nov 12, 2010 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Nov 12, 2010

The following crashes every version of scala from the dawn of man to current trunk.

trait T {
  trait Default { def foo = this }
  object Default extends Default
}

The crash is as follows:

Exception in thread "main" scala.tools.nsc.symtab.Types$$TypeError: ambiguous reference to overloaded definition,
both value T$$Default$$$$$$outer in object Default of type ()T.this.type
and  value T$$Default$$$$$$outer in object Default of type ()T
match expected type ?
at scala.tools.nsc.typechecker.Contexts$$Context.ambiguousError(Contexts.scala:304)
at scala.tools.nsc.typechecker.Infer$$Inferencer$$$$anonfun$$inferExprAlternative$$1.apply$$mcV$$sp(Infer.scala:1544)
at scala.tools.nsc.typechecker.Infer$$Inferencer.tryTwice(Infer.scala:1657)
at scala.tools.nsc.typechecker.Infer$$Inferencer.inferExprAlternative(Infer.scala:1508)

As one might predict based on the error, it only crashes if they are companions and the one extends the other.

Parenthetically, this is what #2969 was attempting to report.

@scabug
Copy link
Author

@scabug scabug commented Nov 12, 2010

@scabug
Copy link
Author

@scabug scabug commented May 13, 2012

Rob Dickens (robcd) said:
Note that,

  • T may be a class
  • Default must be a trait
  • foo must be present.

#5794

@scabug
Copy link
Author

@scabug scabug commented May 16, 2012

@dotta said:
I've a slightly different snippet that seems to fail just in the same way (maybe it's worth adding it in the regression suite once the problem is fixed...)

class Crash { // if you change this to a `trait` it keeps failing, though if it is an `object` it compiles just fine!
  class Element

  class RefCheck(val element: Element)

  /* declare this as a class, and the crash goes away */
  trait ElementOrdering extends Ordering[Element] {
    def compare(a: Element, b: Element): Int = 0
  }

  implicit object ElementOrdering extends ElementOrdering

  class RefCheckOrdering extends Ordering[RefCheck] {
    def compare(a: RefCheck, b: RefCheck): Int =
      ElementOrdering.compare(a.element, b.element)
  }
}

And here is the crash reported by scalac

% scalac Crash.scala 
error: scala.tools.nsc.symtab.Types$TypeError: ambiguous reference to overloaded definition,
both value Crash$ElementOrdering$$$outer in object ElementOrdering of type ()Crash.this.type
and  value Crash$ElementOrdering$$$outer in object ElementOrdering of type ()Crash
match expected type ?
	at scala.tools.nsc.typechecker.Contexts$Context.ambiguousError(Contexts.scala:332)
	at scala.tools.nsc.typechecker.Infer$Inferencer$$anonfun$inferExprAlternative$1.apply$mcV$sp(Infer.scala:1625)
	at scala.tools.nsc.typechecker.Infer$Inferencer.tryTwice(Infer.scala:1737)
	at scala.tools.nsc.typechecker.Infer$Inferencer.inferExprAlternative(Infer.scala:1589)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:707)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4374)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4377)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1741)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4331)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.mixinOuterAccessorDef(ExplicitOuter.scala:353)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1$$anonfun$apply$mcV$sp$1.apply(ExplicitOuter.scala:457)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1$$anonfun$apply$mcV$sp$1.apply(ExplicitOuter.scala:455)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:45)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply$mcV$sp(ExplicitOuter.scala:455)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply(ExplicitOuter.scala:448)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply(ExplicitOuter.scala:448)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:447)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	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.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	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$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:460)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	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.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:760)
	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:899)
	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.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.scala$tools$nsc$transform$ExplicitOuter$ExplicitOuterTransformer$$super$transformUnit(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
	at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:95)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:318)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
	at scala.tools.nsc.transform.ExplicitOuter$Phase.run(ExplicitOuter.scala:539)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
	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" scala.tools.nsc.symtab.Types$TypeError: ambiguous reference to overloaded definition,
both value Crash$ElementOrdering$$$outer in object ElementOrdering of type ()Crash.this.type
and  value Crash$ElementOrdering$$$outer in object ElementOrdering of type ()Crash
match expected type ?
	at scala.tools.nsc.typechecker.Contexts$Context.ambiguousError(Contexts.scala:332)
	at scala.tools.nsc.typechecker.Infer$Inferencer$$anonfun$inferExprAlternative$1.apply$mcV$sp(Infer.scala:1625)
	at scala.tools.nsc.typechecker.Infer$Inferencer.tryTwice(Infer.scala:1737)
	at scala.tools.nsc.typechecker.Infer$Inferencer.inferExprAlternative(Infer.scala:1589)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:707)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4374)
	at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:4377)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1741)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3919)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4331)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.mixinOuterAccessorDef(ExplicitOuter.scala:353)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1$$anonfun$apply$mcV$sp$1.apply(ExplicitOuter.scala:457)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1$$anonfun$apply$mcV$sp$1.apply(ExplicitOuter.scala:455)
	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
	at scala.collection.immutable.List.foreach(List.scala:45)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply$mcV$sp(ExplicitOuter.scala:455)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply(ExplicitOuter.scala:448)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transform$1.apply(ExplicitOuter.scala:448)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:38)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:447)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	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.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
	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$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:49)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:49)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:460)
	at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:765)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:53)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:891)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:889)
	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.transformStats(Trees.scala:889)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
	at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
	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.ast.Trees$Transformer.transform(Trees.scala:760)
	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:899)
	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.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
	at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transform(ExplicitOuter.scala:257)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transform(ExplicitOuter.scala:521)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.scala$tools$nsc$transform$ExplicitOuter$ExplicitOuterTransformer$$super$transformUnit(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$anonfun$transformUnit$1.apply(ExplicitOuter.scala:529)
	at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:95)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:529)
	at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.transformUnit(ExplicitOuter.scala:318)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
	at scala.collection.Iterator$class.foreach(Iterator.scala:660)
	at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
	at scala.tools.nsc.transform.ExplicitOuter$Phase.run(ExplicitOuter.scala:539)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
	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)

I've tested this with both scalac 2.9.1 and 2.9.2.

@scabug
Copy link
Author

@scabug scabug commented Mar 13, 2013

@retronym said:
Unfairly marking as a duplicate of the young upstart: #7242.

These test cases have been included in its fix.

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

Successfully merging a pull request may close this issue.

None yet
2 participants