Aladdin - Scala Bugtracking
[#798] project: compiler priority: low category: bug
submitter assigned to status date submitted
Sean Martin fixed 2006-11-04 13:58:02.0
subject cyclic type parameter stack overflow
code
package test;
trait Test {
  def f(list : Any) = null;
  type Bracks <: Bracks;  
  val bracks : Bracks;
  val singletons = f(bracks);
}
what happened
sean-mcdirmids-computer:~/workspace/test25/src mcdirmid$ ../../scala/build/quick/bin/scalac -log:super -d .\
./bin/ -sourcepath . test/Test.scala
Exception in thread "main" java.lang.StackOverflowError
	at scala.tools.nsc.symtab.Symbols$ModuleSymbol.name(Symbols.scala:1034)
	at scala.tools.nsc.symtab.Symbols$Symbol.isRootPackage(Symbols.scala:209)
	at scala.tools.nsc.symtab.Types$class.singleType(Types.scala:1120)
	at scala.tools.nsc.symtab.SymbolTable.singleType(SymbolTable.scala:10)
	at scala.tools.nsc.symtab.Types$class.singleType(Types.scala:1113)
	at scala.tools.nsc.symtab.SymbolTable.singleType(SymbolTable.scala:10)
	at scala.tools.nsc.symtab.Symbols$ClassSymbol.typeOfThis(Symbols.scala:1195)
	at scala.tools.nsc.symtab.Types$ThisType.singleDeref(Types.scala:580)
	at scala.tools.nsc.symtab.Types$SingletonType.supertype(Types.scala:517)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.base(Types.scala:1459)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.toPrefix$0(Types.scala:1475)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:1476)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:1451)
	at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:1346)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:1507)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:1451)
	at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:1358)
	at scala.tools.nsc.symtab.Types$AsSeenFromMap.apply(Types.scala:1507)
	at scala.tools.nsc.symtab.Types$Type.asSeenFrom(Types.scala:202)
	at scala.tools.nsc.symtab.Types$Type.memberInfo(Types.scala:208)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
	at scala.tools.nsc.symtab.Types$TypeRef.baseType(Types.scala:930)
	at scala.tools.nsc.symtab.Types$SubType.baseType(Types.scala:506)
        .............
what expected
[back to overview]
Changes of this bug report
Martin  edited on  2006-11-17 18:34:37.0