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

scala.reflect.internal.Types$TypeError: ambiguous reference to overloaded definition #7242

Closed
scabug opened this issue Mar 11, 2013 · 11 comments
Closed
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Mar 11, 2013

I got the following compiler crash when compiling some code which I'm unfortunately not able to reduce to a simple reproducible example. Hopefully the information is helpful still. (I can provide a GitHub project with crashable code if needed.)

[error]
[error]      while compiling: E:\prog\jvm\lib\Allegretto\allegretto\src\test\sca
la\no\allegretto\test\feature\PKTestTables.scala
[error]         during phase: explicitouter
[error]      library version: version 2.10.1-RC3
[error]     compiler version: version 2.10.1-RC3
[error]   reconstructed args: -bootclasspath C:\Program Files\Java\jdk1.7.0_13\j
re\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\rt.jar;C:\Program
 Files\Java\jdk1.7.0_13\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.7.0_13
\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_13\jre\lib\jce.jar;C:\Program F
iles\Java\jdk1.7.0_13\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_13\jre
\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_13\jre\classes;C:\Users\Knut Arne Ve
daa\.sbt\boot\scala-2.10.1-RC3\lib\scala-library.jar -d E:\prog\jvm\lib\Allegret
to\allegretto\target\scala-2.10\test-classes -classpath E:\prog\jvm\lib\Allegret
to\allegretto\target\scala-2.10\test-classes;E:\prog\jvm\lib\Allegretto\allegret
to\target\scala-2.10\classes;C:\Users\Knut Arne Vedaa\.ivy2\cache\com.h2database
\h2\jars\h2-1.3.170.jar;C:\Users\Knut Arne Vedaa\.ivy2\cache\org.scalatest\scala
test_2.10\jars\scalatest_2.10-1.9.1.jar;C:\Users\Knut Arne Vedaa\.ivy2\cache\org
.scala-lang\scala-actors\jars\scala-actors-2.10.0.jar;C:\Users\Knut Arne Vedaa\.
ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.10.0.jar
[error]
[error]   last tree to typer: TypeTree
[error]               symbol: null
[error]    symbol definition: null
[error]        symbol owners:
[error]       context owners: value $outer -> object PKTestTable -> trait PKTest
Tables -> package feature
[error]
[error] == Enclosing template or block ==
[error]
[error] Template( // val <local PKTestTable>: <notype> in object PKTestTable, tr
ee.tpe=PKTestTables.this.PKTestTable.type
[error]   "no.allegretto.SchemaLike.Table", "no.allegretto.test.feature.PKTestTa
bles.PKTestTable" // parents
[error]   ValDef(
[error]     private
[error]     "_"
[error]     <tpt>
[error]     <empty>
[error]   )
[error]   DefDef( // def <init>(): PKTestTables.this.PKTestTable.type in object
PKTestTable
[error]     <method> <triedcooking>
[error]     "<init>"
[error]     []
[error]     List(Nil)
[error]     <tpt> // tree.tpe=PKTestTables.this.PKTestTable.type
[error]     Block( // tree.tpe=Unit
[error]       Apply( // def <init>(name: String): SchemaLike.this.Table in class
 Table, tree.tpe=PKTestTables.this.Table
[error]         PKTestTable.super."<init>" // def <init>(name: String): SchemaLi
ke.this.Table in class Table, tree.tpe=(name: String)PKTestTables.this.Table
[error]         "PKTestTable"
[error]       )
[error]       ()
[error]     )
[error]   )
[error] )
[error]
[error] uncaught exception during compilation: scala.reflect.internal.Types$Type
Error
[trace] Stack trace suppressed: run last test:compile for the full output.
[error] (test:compile) scala.reflect.internal.Types$TypeError: ambiguous referen
ce to overloaded definition,
[error] both value $outer in object PKTestTable of type ()no.allegretto.<refinem
ent>.type
[error] and  value $outer in object PKTestTable of type ()no.allegretto.test.fea
ture.PKTestTables
[error] match expected type ?
@scabug
Copy link
Author

@scabug scabug commented Mar 11, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7242?orig=1
Reporter: Knut Arne Vedaa (kavedaa)
Affected Versions: 2.9.2, 2.10.0, 2.10.1-RC3, 2.10.1

@scabug
Copy link
Author

@scabug scabug commented Mar 11, 2013

@adriaanm said:
Could you run last test:compile to get the full stack trace? Also, it would be good to know if this is broken under 2.10.0 as well.

@scabug
Copy link
Author

@scabug scabug commented Mar 11, 2013

Knut Arne Vedaa (kavedaa) said:
Yes, it's also broken in 2.10.0 and all RCs of 2.10.1 as well.

Stack trace:

[error] uncaught exception during compilation: scala.reflect.internal.Types$Type
Error
scala.reflect.internal.Types$TypeError: ambiguous reference to overloaded defini
tion,
both value $outer in object PKTestTable of type ()no.allegretto.<refinement>.typ
e
and  value $outer in object PKTestTable of type ()no.allegretto.test.feature.PKT
estTables
match expected type ?
        at scala.tools.nsc.typechecker.Contexts$Context.issueAmbiguousError(Cont
exts.scala:405)
        at scala.tools.nsc.typechecker.ContextErrors$ErrorUtils$.issueAmbiguousT
ypeError(ContextErrors.scala:81)
        at scala.tools.nsc.typechecker.ContextErrors$InferencerContextErrors$Inf
erErrorGen$.AmbiguousExprAlternativeError(ContextErrors.scala:875)
        at scala.tools.nsc.typechecker.Infer$Inferencer$$anonfun$inferExprAltern
ative$1.apply(Infer.scala:1546)
        at scala.tools.nsc.typechecker.Infer$Inferencer$$anonfun$inferExprAltern
ative$1.apply(Infer.scala:1512)
        at scala.tools.nsc.typechecker.Infer$Inferencer.tryTwice(Infer.scala:170
7)
        at scala.tools.nsc.typechecker.Infer$Inferencer.inferExprAlternative(Inf
er.scala:1512)
        at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1094)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5645)
        at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:5749)

        at scala.tools.nsc.typechecker.Typers$Typer.typedType(Typers.scala:5752)

        at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:223
3)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5557)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5630)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5687)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.mixi
nOuterAccessorDef(ExplicitOuter.scala:400)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transform$1$$anonfun$apply$mcV$sp$1.apply(ExplicitOuter.scala:496)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transform$1.apply$mcV$sp(ExplicitOuter.scala:494)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transform$1.apply(ExplicitOuter.scala:487)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transform$1.apply(ExplicitOuter.scala:487)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:486)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:360)
        at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:290
4)
        at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:
1280)
        at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:
1279)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:28)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:19)
        at scala.reflect.internal.Trees$class.itransform(Trees.scala:1278)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transf
orm(TypingTransformers.scala:48)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transfor
m(ExplicitOuter.scala:299)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:594)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:360)
        at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(T
rees.scala:2927)
        at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(T
rees.scala:2925)
        at scala.collection.immutable.List.loop$1(List.scala:170)
        at scala.collection.immutable.List.mapConserve(List.scala:186)
        at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2925)
        at scala.reflect.internal.Trees$class.itransform(Trees.scala:1276)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$
tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(Typing
Transformers.scala:44)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonf
un$transform$1.apply(TypingTransformers.scala:44)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonf
un$transform$1.apply(TypingTransformers.scala:44)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transf
orm(TypingTransformers.scala:44)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transfor
m(ExplicitOuter.scala:299)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:499)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:360)
        at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:290
4)
        at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:
1280)
        at scala.reflect.internal.Trees$$anonfun$itransform$4.apply(Trees.scala:
1279)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:28)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:19)
        at scala.reflect.internal.Trees$class.itransform(Trees.scala:1278)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transf
orm(TypingTransformers.scala:48)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transfor
m(ExplicitOuter.scala:299)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:594)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:360)
        at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(T
rees.scala:2927)
        at scala.reflect.api.Trees$Transformer$$anonfun$transformStats$1.apply(T
rees.scala:2925)
        at scala.collection.immutable.List.loop$1(List.scala:170)
        at scala.collection.immutable.List.mapConserve(List.scala:186)
        at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2925)
        at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:
1298)
        at scala.reflect.internal.Trees$$anonfun$itransform$7.apply(Trees.scala:
1298)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:28)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:19)
        at scala.reflect.internal.Trees$class.itransform(Trees.scala:1297)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:13)
        at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2897)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$
tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(Typing
Transformers.scala:44)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonf
un$transform$2.apply(TypingTransformers.scala:46)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonf
un$transform$2.apply(TypingTransformers.scala:46)
        at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2936)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwne
r(TypingTransformers.scala:34)
        at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transf
orm(TypingTransformers.scala:46)
        at scala.tools.nsc.transform.ExplicitOuter$OuterPathTransformer.transfor
m(ExplicitOuter.scala:299)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:594)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sform(ExplicitOuter.scala:360)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:227)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.scal
a$tools$nsc$transform$ExplicitOuter$ExplicitOuterTransformer$$super$transformUni
t(ExplicitOuter.scala:602)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transformUnit$1.apply(ExplicitOuter.scala:602)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer$$ano
nfun$transformUnit$1.apply(ExplicitOuter.scala:602)
        at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207)
        at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:216)
        at scala.tools.nsc.transform.ExplicitOuter$ExplicitOuterTransformer.tran
sformUnit(ExplicitOuter.scala:602)
        at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
        at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:463)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:
430)
        at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:
430)
        at scala.collection.Iterator$class.foreach(Iterator.scala:727)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
        at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:430)
        at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1582)
        at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1556)
        at scala.tools.nsc.Global$Run.compileSources(Global.scala:1552)
        at scala.tools.nsc.Global$Run.compile(Global.scala:1661)
        at xsbt.CachedCompiler0.run(CompilerInterface.scala:90)
        at xsbt.CachedCompiler0.run(CompilerInterface.scala:72)
        at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:73)
        at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
        at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
        at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.a
pply$mcV$sp(AggressiveCompile.scala:71)
        at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.a
pply(AggressiveCompile.scala:71)
        at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.a
pply(AggressiveCompile.scala:71)
        at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(
AggressiveCompile.scala:101)
        at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCo
mpile.scala:70)
        at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.sca
la:88)
        at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.sca
la:60)
        at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:2
4)
        at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:2
2)
        at sbt.inc.Incremental$.cycle(Incremental.scala:40)
        at sbt.inc.Incremental$.compile(Incremental.scala:25)
        at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
        at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
        at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
        at sbt.compiler.AggressiveCompile.apply(AggressiveCompile.scala:31)
        at sbt.Compiler$.apply(Compiler.scala:79)
        at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
        at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:572)
        at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
        at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:578)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structu
re.scala:311)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structu
re.scala:311)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
        at sbt.std.Transform$$anon$5.work(System.scala:71)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
2)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
2)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:238)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
        at java.lang.Thread.run(Thread.java:722)
[error] (test:compile) scala.reflect.internal.Types$TypeError: ambiguous referen
ce to overloaded definition,
[error] both value $outer in object PKTestTable of type ()no.allegretto.<refinem
ent>.type
[error] and  value $outer in object PKTestTable of type ()no.allegretto.test.fea
ture.PKTestTables
[error] match expected type ?
>

@scabug
Copy link
Author

@scabug scabug commented Mar 11, 2013

@retronym said:
An example of the crashing code, even if it's not minimized, would be most welcome.

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

@hubertp said:
It is worth noting that this kicks in ExplicitOuter rather than usual Typers. Meaning that any buffering of errors is gone, hence the exception. Any ambiguity shouldn't arise so late in the compilation I guess anyway.

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

Knut Arne Vedaa (kavedaa) said:
https://github.com/kavedaa/allegretto/tree/0.3

Relevant file: https://github.com/kavedaa/allegretto/blob/0.3/src/test/scala/no/allegretto/test/feature/crash.scala

The error is introduced in the latest commit. It seems to be an issue with a companion object extending its companion trait.

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

@retronym said:
I can't reproduce the crash with that repository with either 2.10.0 or 2.10.1-RC3.

Getting Scala 2.10.1-RC3 ...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.1-RC3/scala-compiler-2.10.1-RC3.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.1-RC3!scala-compiler.jar (3555ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.1-RC3/scala-library-2.10.1-RC3.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-library;2.10.1-RC3!scala-library.jar (1171ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.1-RC3/scala-reflect-2.10.1-RC3.jar ...
	[SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.1-RC3!scala-reflect.jar (409ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/jline/2.10.1-RC3/jline-2.10.1-RC3.jar ...
	[SUCCESSFUL ] org.scala-lang#jline;2.10.1-RC3!jline.jar (283ms)
:: retrieving :: org.scala-sbt#boot-scala
	confs: [default]
	5 artifacts copied, 0 already retrieved (24386kB/38ms)
[info] Updating {file:/Users/jason/code/allegretto/}default-d735bb...
[info] Resolving org.scala-lang#scala-reflect;2.10.0 ...
[info] Done updating.
[info] Compiling 47 Scala sources to /Users/jason/code/allegretto/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.1-RC3. Compiling...
[info]   Compilation completed in 10.751 s
[warn] there were 50 feature warning(s); re-run with -feature for details
[warn] one warning found
[success] Total time: 28 s, completed Mar 12, 2013 10:31:34 PM
> package
[info] Packaging /Users/jason/code/allegretto/target/scala-2.10/allegretto_2.10-0.3-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 0 s, completed Mar 12, 2013 10:32:27 PM
> eval "git branch -v" !
* 0.3    d84dad1 crashes compiler (simpler example)
  master b234b60 m

Could please post a transcript that shows how to reproduce?

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

@retronym said:
Oh, I see, test:compile is needed.

@scabug
Copy link
Author

@scabug scabug commented Mar 12, 2013

@retronym said:
Minimized:

class CrashTest {
  trait CrashTestTable {
    def cols = 1
  }
  object CrashTestTable extends CrashTestTable
}

@scabug
Copy link
Author

@scabug scabug commented Mar 13, 2013

@scabug
Copy link
Author

@scabug scabug commented Mar 13, 2013

@paulp said:
We should really figure a way not to duplicate this much effort. I didn't squander most of my 30s minimizing bugs in the hopes of becoming the Van Gogh or Kafka of scala issues, unknown in my own time, not to be celebrated until shortly after my early demise. "Wow, look at all this stuff!"

@scabug scabug closed this Mar 22, 2013
@scabug scabug added the has PR label Apr 7, 2017
@scabug scabug added this to the 2.10.2-RC1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants