scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
230 stars 21 forks source link

Regression in 2.11: FatalError trying to do lub/glb of typevar #8651

Closed scabug closed 10 years ago

scabug commented 10 years ago

Code that worked fine in Scala 2.10 now crashes scalac with 2.11.

[error] (base-test/compile:compile) scala.reflect.internal.FatalError: 
[error]   trying to do lub/glb of typevar ?S
[error]      while compiling: /home/golly/BeardedLogic/projects/shipreq/Code/base-test/src/main/scala/shipreq/base/test/MockOpTransformer.scala
[error]         during phase: typer
[error]      library version: version 2.11.1
[error]     compiler version: version 2.11.1
[error]   reconstructed args: -bootclasspath /opt/java/jre/lib/resources.jar:/opt/java/jre/lib/rt.jar:/opt/java/jre/lib/sunrsasign.jar:/opt/java/jre/lib/jsse.jar:/opt/java/jre/lib/jce.jar:/opt/java/jre/lib/charsets.jar:/opt/java/jre/lib/jfr.jar:/opt/java/jre/classes:/home/golly/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.1.jar -feature -Xcheckinit -language:postfixOps -language:implicitConversions -language:higherKinds -language:existentials -nowarn -unchecked -classpath /home/golly/BeardedLogic/projects/shipreq/Code/base-test/target/scala-2.11/classes:/home/golly/BeardedLogic/projects/shipreq/Code/base-util/target/scala-2.11/classes:/home/golly/BeardedLogic/projects/shipreq/Code/base-db/target/scala-2.11/classes:/home/golly/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.7.jar:/home/golly/.ivy2/cache/org.scalaz/scalaz-core_2.11/bundles/scalaz-core_2.11-7.1.0-M7.jar:/home/golly/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.1.jar:/home/golly/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.1.jar:/home/golly/.ivy2/cache/org.postgresql/postgresql/jars/postgresql-9.3-1101-jdbc41.jar:/home/golly/.ivy2/cache/com.typesafe.slick/slick_2.11/bundles/slick_2.11-2.1.0-M2.jar:/home/golly/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar:/home/golly/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.8.0.RELEASE.jar:/home/golly/.ivy2/cache/com.google.guava/guava/bundles/guava-15.0.jar:/home/golly/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-2.0.2.jar:/home/golly/.ivy2/cache/com.googlecode.flyway/flyway-core/jars/flyway-core-2.3.1.jar:/home/golly/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.2.jar:/home/golly/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.2.jar:/home/golly/.ivy2/cache/org.scalatest/scalatest_2.11/jars/scalatest_2.11-2.1.3.jar:/home/golly/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.0.jar:/home/golly/.ivy2/cache/org.specs2/specs2_2.11/jars/specs2_2.11-2.3.12.jar:/home/golly/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.0.jar:/home/golly/.ivy2/cache/org.pegdown/pegdown/jars/pegdown-1.2.1.jar:/home/golly/.ivy2/cache/org.parboiled/parboiled-java/jars/parboiled-java-1.1.4.jar:/home/golly/.ivy2/cache/org.parboiled/parboiled-core/jars/parboiled-core-1.1.4.jar:/home/golly/.ivy2/cache/org.ow2.asm/asm/jars/asm-4.1.jar:/home/golly/.ivy2/cache/org.ow2.asm/asm-tree/jars/asm-tree-4.1.jar:/home/golly/.ivy2/cache/org.ow2.asm/asm-analysis/jars/asm-analysis-4.1.jar:/home/golly/.ivy2/cache/org.ow2.asm/asm-util/jars/asm-util-4.1.jar:/home/golly/.ivy2/cache/org.scalaz/scalaz-concurrent_2.11/bundles/scalaz-concurrent_2.11-7.0.6.jar:/home/golly/.ivy2/cache/org.scalaz/scalaz-effect_2.11/bundles/scalaz-effect_2.11-7.0.6.jar:/home/golly/.ivy2/cache/org.scalacheck/scalacheck_2.11/jars/scalacheck_2.11-1.11.3.jar:/home/golly/.ivy2/cache/org.scala-sbt/test-interface/jars/test-interface-1.0.jar:/home/golly/.ivy2/cache/org.hamcrest/hamcrest-core/jars/hamcrest-core-1.3.jar:/home/golly/.ivy2/cache/org.mockito/mockito-core/jars/mockito-core-1.9.5.jar:/home/golly/.ivy2/cache/org.objenesis/objenesis/jars/objenesis-1.0.jar:/home/golly/.ivy2/cache/junit/junit/jars/junit-4.11.jar:/home/golly/.ivy2/cache/org.specs2/classycle/jars/classycle-1.4.3.jar
[error] 
[error]   last tree to typer: Ident(_)
[error]        tree position: line 72 of /home/golly/BeardedLogic/projects/shipreq/Code/base-test/src/main/scala/shipreq/base/test/MockOpTransformer.scala
[error]             tree tpe: shipreq.base.test.MockOpTransformer1[Op,I,S,A]
[error]               symbol: <none>
[error]    symbol definition: <none> (a NoSymbol)
[error]       symbol package: <none>
[error]        symbol owners: 
[error]            call site: method equals in class MockOpTransformer1 in package test
[error] 
[error] == Source file context for tree position ==
[error] 
[error]     69 }
[error]     70 
[error]     71 case class MockOpTransformer1[Op[_], I[_]: Applicative, S <: Op[A]: Manifest, A](ttp: OpTypeProvider[Op], default: A)
[error]     72     extends MockOpTransformerA[Op, I] {
[error]     73 
[error]     74   final def S = implicitly[Manifest[S]]
[error]     75 

This may be the same as #8602. Unlike that issue this is happening outside of a value class.

scabug commented 10 years ago

Imported From: https://issues.scala-lang.org/browse/SI-8651?orig=1 Reporter: David Barri (japgolly) Affected Versions: 2.11.1

scabug commented 10 years ago

@adriaanm said: Thanks! Closing this one as duplicate, updating the original with the simplified repro based on your report.