-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
scalac compiles but dotc crashes.
$ dotc -version
Dotty compiler version 0.5.0-bin-SNAPSHOT-git-4fefb64 -- Copyright 2002-2017, LAMP/EPFL
$ dotc abc.scala
Exception in thread "main" java.lang.StackOverflowError
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
at dotty.tools.dotc.core.Types$TypeMap.mapOver$$anonfun$1(Types.scala:3885)
at dotty.tools.dotc.core.Types$LazyRef.ref(Types.scala:2179)
<snipped>
$ cat abc.scala
package bar {
trait M[F[_]]
class S[X[_] <: M[X], A](val x: X[A])
object S {
def apply[X[_] <: M[X], A](x: X[A]): S[X, A] = S[X, A](x)
def unapply[X[_] <: M[X], A](p: S[X, A]) = S(p x)
}
}