This page is no longer maintained — Please continue to the home page at www.scala-lang.org

compiler crash

10 replies
Daniel Mahler
Joined: 2009-05-25,
User offline. Last seen 1 year 24 weeks ago.

Welcome to Scala version 2.8.0.r18965-b20091008021654 (OpenJDK 64-Bit
Server VM, Java 1.6.0_0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scala.collection.JavaConversions._
import scala.collection.JavaConversions._

scala> def apply[X](xs : X*) : java.util.List[X] =
java.util.Arrays.asList(xs : _*)
exception when traversing java.util.Arrays.asList[X]((xs: _*))
exception when traversing def apply[X >: Nothing <: Any](xs: Seq[X]):
java.util.List[X] = java.util.Arrays.asList[X]((xs: _*))
exception when traversing java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
exception when traversing final class $iw extends java.lang.Object
with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
exception when traversing java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
}
exception when traversing final class $iw extends java.lang.Object
with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
}
exception when traversing java.lang.Object with ScalaObject {
def this(): object $iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
}
}
exception when traversing final class $iw extends java.lang.Object
with ScalaObject {
def this(): object $iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X] =
java.util.Arrays.asList[X]((xs: _*))
}
}
}
exception when traversing java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X]
= java.util.Arrays.asList[X]((xs: _*))
}
}
}
}
exception when traversing final class $iw extends java.lang.Object
with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw.$iw.$iw.$iw = {
$iw.super.this();
()
};
def apply[X >: Nothing <: Any](xs: Seq[X]): java.util.List[X]
= java.util.Arrays.asList[X]((xs: _*))
}
}
}
}
Exception in thread "main" scala.tools.nsc.symtab.Types$TypeError:
cannot find class manifest for element type X
at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:314)
at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:269)
at scala.tools.nsc.typechecker.Typers$Typer.getManifestTree(Typers.scala:3940)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$sequenceToArray$1$1.apply(UnCurry.scala:408)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$sequenceToArray$1$1.apply(UnCurry.scala:405)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:104)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.sequenceToArray$1(UnCurry.scala:404)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformArgs(UnCurry.scala:419)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:575)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$3.apply(UnCurry.scala:573)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:465)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:573)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:1453)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:1451)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1450)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$1.apply(UnCurry.scala:504)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withNeedLift$1(UnCurry.scala:465)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:503)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.collection.immutable.List.loop$2(List.scala:129)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1467)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withInConstructorFlag$1(UnCurry.scala:496)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1549)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1437)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1436)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1435)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.collection.immutable.List.loop$2(List.scala:129)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1467)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withInConstructorFlag$1(UnCurry.scala:496)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1549)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1437)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1436)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1435)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.collection.immutable.List.loop$2(List.scala:129)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1467)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withInConstructorFlag$1(UnCurry.scala:496)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1549)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1437)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1436)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1435)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.collection.immutable.List.loop$2(List.scala:129)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1467)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withInConstructorFlag$1(UnCurry.scala:496)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1549)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1437)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1436)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1435)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.collection.immutable.List.loop$2(List.scala:129)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1467)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$1.apply(TypingTransformers.scala:48)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.scala$tools$nsc$transform$UnCurry$UnCurryTransformer$$super$transform(UnCurry.scala:521)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer$$anonfun$mainTransform$6.apply(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.withInConstructorFlag$1(UnCurry.scala:496)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:598)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:1549)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1437)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:1436)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1435)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:52)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1565)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:1563)
at scala.collection.immutable.List.loop$2(List.scala:125)
at scala.collection.immutable.List.mapConserve(List.scala:142)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:1563)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1431)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:1431)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:1430)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.scala$tools$nsc$transform$TypingTransformers$TypingTransformer$$super$transform(TypingTransformers.scala:48)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:50)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$anonfun$transform$2.apply(TypingTransformers.scala:50)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:1573)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:37)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:50)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.mainTransform(UnCurry.scala:601)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transform(UnCurry.scala:147)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:141)
at scala.tools.nsc.transform.UnCurry$UnCurryTransformer.transformUnit(UnCurry.scala:130)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:31)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:307)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:307)
at scala.collection.Iterator$class.foreach(Iterator.scala:536)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:280)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:307)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:799)
at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:718)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:432)
at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:331)
at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:341)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:308)
at scala.tools.nsc.InterpreterLoop.processLine$1(InterpreterLoop.scala:205)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:223)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:379)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:126)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

Ricky Clarkson
Joined: 2008-12-19,
User offline. Last seen 3 years 2 weeks ago.
Re: compiler crash
ratiud
Joined: 2010-02-07,
User offline. Last seen 42 years 45 weeks ago.
Compiler crash

Hi,

I am using the Scala nightly build (from eclipse) and when entering this
code:

{{{
scala> for (k <- 0 until xs.xize)
for(i = 0 until (xs.size)) {

}
}}}

the compiler crashes with the folowing message:

| :2: error: '<-' expected but '=' found.
for(i = 0 until (xs.size)) {
^
Exception in thread "main" java.lang.UnsupportedOperationException:
Position.point
at scala.tools.nsc.util.Position$class.point(Position.scala:89)
at scala.tools.nsc.util.NoPosition$.point(Position.scala:194)
at scala.tools.nsc.util.Position$class.endOrPoint(Position.scala:98)
at scala.tools.nsc.util.NoPosition$.endOrPoint(Position.scala:194)
at
scala.tools.nsc.ast.parser.TreeBuilder.closurePos$1(TreeBuilder.scala:365)
at scala.tools.nsc.ast.parser.TreeBuilder.makeFor(TreeBuilder.scala:370)
at scala.tools.nsc.ast.parser.TreeBuilder.makeFor(TreeBuilder.scala:403)
at scala.tools.nsc.ast.parser.Parsers$Parser.expr0(Parsers.scala:1054)
at scala.tools.nsc.ast.parser.Parsers$Parser.expr(Parsers.scala:991)
at
scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:2516)
at
scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:2511)
at
scala.tools.nsc.ast.parser.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:199)
at
scala.tools.nsc.ast.parser.Parsers$Parser.templateStatSeq(Parsers.scala:2511)
at
scala.tools.nsc.Interpreter$$anonfun$parse$2.simpleParse$1(Interpreter.scala:464)
at
scala.tools.nsc.Interpreter$$anonfun$parse$2.apply(Interpreter.scala:466)
at
scala.tools.nsc.Interpreter$$anonfun$parse$2.apply(Interpreter.scala:457)
at
scala.tools.nsc.reporters.Reporter.withIncompleteHandler(Reporter.scala:76)
at scala.tools.nsc.Interpreter.parse(Interpreter.scala:457)
at scala.tools.nsc.Interpreter.requestFromLine(Interpreter.scala:544)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:582)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:580)
at
scala.tools.nsc.InterpreterLoop.reallyInterpret$1(InterpreterLoop.scala:486)
at
scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:523)
at
scala.tools.nsc.InterpreterLoop.reallyInterpret$1(InterpreterLoop.scala:496)
at
scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:523)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:379)
at scala.tools.nsc.InterpreterLoop.processLine$1(InterpreterLoop.scala:238)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:244)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:562)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:612)
at scala.tools.nsc.MainInterpreter$.main(MainInterpreter.scala:12)
at scala.tools.nsc.MainInterpreter.main(MainInterpreter.scala)

Thanks,
Dan

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Compiler crash

On Sun, Feb 7, 2010 at 6:25 PM, ratiud wrote:
> I am using the Scala nightly build (from eclipse) and when entering this
> code:
>
> {{{
> scala> for (k <- 0 until xs.xize)
>                for(i = 0 until (xs.size)) {
>
>                }
> }}}
>
> the compiler crashes with the folowing message:
>
>  | :2: error: '<-' expected but '=' found.
>                        for(i = 0 until (xs.size)) {
>                              ^
> Exception in thread "main" java.lang.UnsupportedOperationException:
> Position.point

Could you create a ticket for this in Trac so that it doesn't get
forgotten about ... assign it to me (milessabin) ... thanks.

Cheers,

Miles

Aydjen
Joined: 2009-08-21,
User offline. Last seen 1 year 28 weeks ago.
compiler crash

Hello,

installed the latest Eclipse plug-in nightly (2.8.0.r21561-b20100414033506) today and got the following compiler crash:

eclipse.buildId=M20100211-1343
java.version=1.6.0_17
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE

java.lang.NullPointerException
at scala.tools.nsc.typechecker.Typers$Typer.namesWhatIdent(Typers.scala:1695)
at scala.tools.nsc.typechecker.Typers$Typer.checkShadowings(Typers.scala:1740)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedDefDef$2.apply(Typers.scala:1802)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedDefDef$2.apply(Typers.scala:1801)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:814)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:813)
at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1801)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3815)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:213)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2141)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2209)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2209)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2209)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1528)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1309)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3806)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:208)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2141)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2209)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2209)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2209)
at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1966)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3842)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:201)
at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2215)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2225)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2224)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:203)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:203)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:203)
at scala.collection.immutable.List.map(List.scala:46)
at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2224)
at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2423)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3373)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3997)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:276)
at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:1967)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3842)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:201)
at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4218)
at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:4224)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4037)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:276)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:3357)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:3357)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:731)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3357)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3997)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:276)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:4295)
at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1848)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3815)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4151)
at scala.tools.nsc.typechecker.Duplicators$BodyDuplicator.typed(Duplicators.scala:213)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4199)
at scala.tools.nsc.typechecker.Duplicators.retyped(Duplicators.scala:32)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.duplicateBody(SpecializeTypes.scala:1176)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1056)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:832)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:832)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:832)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1041)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1041)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1041)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:834)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:728)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:727)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:726)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1139)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:850)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:848)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:848)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1139)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:999)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:798)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1139)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:744)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:742)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:741)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1139)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:832)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:832)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.collection.immutable.List.loop$1(List.scala:120)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:832)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1041)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$3.apply(SpecializeTypes.scala:1041)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1041)
at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:834)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:728)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:727)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:29)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:726)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:51)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1139)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:850)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformStats$1.apply(Trees.scala:848)
at scala.collection.immutable.List.loop$1(List.scala:116)
at scala.collection.immutable.List.mapConserve(List.scala:133)
at scala.tools.nsc.ast.Trees$Transformer.transformStats(Trees.scala:848)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$2.apply(SpecializeTypes.scala:1028)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6$$anonfun$transform$2.apply(SpecializeTypes.scala:1026)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:858)
at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:36)
at scala.tools.nsc.transform.SpecializeTypes$$anon$6.transform(SpecializeTypes.scala:1026)
at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer$$anonfun$transform$5.apply(SpecializeTypes.scala:1377)
at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer$$anonfun$transform$5.apply(SpecializeTypes.scala:1376)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:104)
at scala.tools.nsc.transform.SpecializeTypes$SpecializationTransformer.transform(SpecializeTypes.scala:1376)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:851)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:31)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:272)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:272)
at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:49)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:272)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:248)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:248)
at scala.collection.Iterator$class.foreach(Iterator.scala:627)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:305)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:248)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:729)
at scala.tools.nsc.Global$Run.compileFiles(Global.scala:800)
at scala.tools.nsc.interactive.RefinedBuildManager.update0$1(RefinedBuildManager.scala:127)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:186)
at scala.tools.nsc.interactive.RefinedBuildManager.update(RefinedBuildManager.scala:93)
at scala.tools.eclipse.EclipseBuildManager.build(EclipseBuildManager.scala:119)
at scala.tools.eclipse.ScalaProject.build(ScalaProject.scala:421)
at scala.tools.eclipse.ScalaBuilder.build(ScalaBuilder.scala:87)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Should I file a ticket or is this already known? (I looked through the Trac tickets but found nothing.)

-Andreas

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: compiler crash

On Wed, Apr 14, 2010 at 09:00:48PM +0200, Andreas Flierl wrote:
> java.lang.NullPointerException
> at scala.tools.nsc.typechecker.Typers$Typer.namesWhatIdent(Typers.scala:1695)
> at scala.tools.nsc.typechecker.Typers$Typer.checkShadowings(Typers.scala:1740)

This is only called if you supply -Ywarn-shadowing. You did do this,
yes? Please don't file tickets about -Y options. The most likely result
of filing such a ticket is seeing the option disappear.

Aydjen
Joined: 2009-08-21,
User offline. Last seen 1 year 28 weeks ago.
Re: compiler crash

Thanks for clearing this up. If I've had the slightest idea that the -Y option was the cause, I wouldn't have bothered to ask. I'll be sure to disable all -Y options next time anything strange happens.

Am 14.04.2010 um 21:12 schrieb Paul Phillips:

> On Wed, Apr 14, 2010 at 09:00:48PM +0200, Andreas Flierl wrote:
>> java.lang.NullPointerException
>> at scala.tools.nsc.typechecker.Typers$Typer.namesWhatIdent(Typers.scala:1695)
>> at scala.tools.nsc.typechecker.Typers$Typer.checkShadowings(Typers.scala:1740)
>
> This is only called if you supply -Ywarn-shadowing. You did do this,
> yes? Please don't file tickets about -Y options. The most likely result
> of filing such a ticket is seeing the option disappear.
>

Aydjen
Joined: 2009-08-21,
User offline. Last seen 1 year 28 weeks ago.
Re: compiler crash

Oddly, when I try to switch it off, it switches itself back on in Eclipse preferences, no matter if I do it on project or global settings. All other options seem fine, but "Xwarninit", "Ywarn-dead-code", "Ywarn-shadowing", "Ywarn-catches" turn themselves on automatically, even if I delete all preference files, restart Eclipse etc etc.

Does anybody have an idea what to do?
Thanks in advance.

Am 14.04.2010 um 21:27 schrieb Andreas Flierl:

> Thanks for clearing this up. If I've had the slightest idea that the -Y option was the cause, I wouldn't have bothered to ask. I'll be sure to disable all -Y options next time anything strange happens.

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: compiler crash

On Wed, Apr 14, 2010 at 10:38:43PM +0200, Andreas Flierl wrote:
> Oddly, when I try to switch it off, it switches itself back on in
> Eclipse preferences, no matter if I do it on project or global
> settings. All other options seem fine, but "Xwarninit",
> "Ywarn-dead-code", "Ywarn-shadowing", "Ywarn-catches" turn themselves
> on automatically, even if I delete all preference files, restart
> Eclipse etc etc.

I imagine it is the option which turns those four options on
(-Xstrict-warnings) which I see is under -X which I will soon alter. In
fact given my last couple weeks I think I'll tear out all the vaguely
sketchy options. They'll return someday in a compiler plugin.

Johannes Goetz
Joined: 2011-10-25,
User offline. Last seen 42 years 45 weeks ago.
compiler crash
Hi All,

Compiling the following program with scalac (Scala compiler version 2.9.1.final -- Copyright 2002-2011, LAMP/EPFL)
on Windows 7 64 Bit results in a compiler error. Does somebody know what's going on here?

Cheers



program:

trait A[a]
case class B[a] extends A[a]

class C[a] {
    def f(): A[a] = {
          def g(x: A[a]): A[a] = x match {
              case y:B[a] => {
                  g(y)
              }
          }
         
        g(null)
    }
}

compiler error:
error: scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : B[a(in method g)]
 required: A[a(in class C)]
    at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
    at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2204)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2203)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:66)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:64)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.Tuple3$Zipped.map(Tuple3.scala:64)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2203)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2421)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4104)
    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.TailCalls$TailCallElimination.rewriteTailCall$1(TailCalls.scala:211)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.rewriteApply$1(TailCalls.scala:220)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:302)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:271)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    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.transformTrees(Trees.scala:873)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:284)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
    at scala.collection.immutable.List.map(List.scala:45)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.noTailTransforms(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:263)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    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.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:765)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:760)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
    at scala.tools.nsc.transform.TailCalls$Phase.apply(TailCalls.scala:34)
    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.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: type mismatch;
 found   : B[a(in method g)]
 required: A[a(in class C)]
    at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
    at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2204)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2203)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:66)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:64)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.Tuple3$Zipped.map(Tuple3.scala:64)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2203)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2421)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4104)
    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.TailCalls$TailCallElimination.rewriteTailCall$1(TailCalls.scala:211)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.rewriteApply$1(TailCalls.scala:220)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:302)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:271)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    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.transformTrees(Trees.scala:873)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:284)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
    at scala.collection.immutable.List.map(List.scala:45)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.noTailTransforms(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:263)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    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.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:765)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:760)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
    at scala.tools.nsc.transform.TailCalls$Phase.apply(TailCalls.scala:34)
    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.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)

Johannes Goetz
Joined: 2011-10-25,
User offline. Last seen 42 years 45 weeks ago.
compiler crash
Hi All,

Compiling the following program with scalac (Scala compiler version 2.9.1.final -- Copyright 2002-2011, LAMP/EPFL)
on Windows 7 64 Bit results in a compiler error. Does somebody know what's going on here?

Cheers



program:

trait A[a]
case class B[a] extends A[a]

class C[a] {
    def f(): A[a] = {
          def g(x: A[a]): A[a] = x match {
              case y:B[a] => {
                  g(y)
              }
          }
         
        g(null)
    }
}

compiler error:
error: scala.tools.nsc.symtab.Types$TypeError: type mismatch;
 found   : B[a(in method g)]
 required: A[a(in class C)]
    at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
    at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2204)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2203)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:66)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:64)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.Tuple3$Zipped.map(Tuple3.scala:64)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2203)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2421)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4104)
    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.TailCalls$TailCallElimination.rewriteTailCall$1(TailCalls.scala:211)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.rewriteApply$1(TailCalls.scala:220)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:302)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:271)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    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.transformTrees(Trees.scala:873)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:284)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
    at scala.collection.immutable.List.map(List.scala:45)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.noTailTransforms(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:263)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    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.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:765)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:760)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
    at scala.tools.nsc.transform.TailCalls$Phase.apply(TailCalls.scala:34)
    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.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: type mismatch;
 found   : B[a(in method g)]
 required: A[a(in class C)]
    at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:298)
    at scala.tools.nsc.typechecker.Infer$Inferencer.error(Infer.scala:207)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeError(Infer.scala:217)
    at scala.tools.nsc.typechecker.Infer$Inferencer.typeErrorTree(Infer.scala:232)
    at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:936)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4280)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArg(Typers.scala:2191)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2204)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedArgs$3.apply(Typers.scala:2203)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:66)
    at scala.Tuple3$Zipped$$anonfun$map$1.apply(Tuple3.scala:64)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.Tuple3$Zipped.map(Tuple3.scala:64)
    at scala.tools.nsc.typechecker.Typers$Typer.typedArgs(Typers.scala:2203)
    at scala.tools.nsc.typechecker.Typers$Typer.doTypedApply(Typers.scala:2421)
    at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:3371)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4104)
    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.TailCalls$TailCallElimination.rewriteTailCall$1(TailCalls.scala:211)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.rewriteApply$1(TailCalls.scala:220)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:302)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:271)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    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.transformTrees(Trees.scala:873)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:284)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination$$anonfun$noTailTransforms$1.apply(TailCalls.scala:173)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
    at scala.collection.immutable.List.map(List.scala:45)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.noTailTransforms(TailCalls.scala:173)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:263)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:166)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:232)
    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.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:765)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    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.ast.Trees$Transformer.transform(Trees.scala:760)
    at scala.tools.nsc.transform.TailCalls$TailCallElimination.transform(TailCalls.scala:309)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
    at scala.tools.nsc.transform.TailCalls$Phase.apply(TailCalls.scala:34)
    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.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)

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland