Aladdin - Scala Bugtracking
[#283] project: compiler priority: high category: bug
submitter assigned to status date submitted
Nikolay Martin not repro 2004-01-26 10:19:23.0
subject StatackOverflow in Type.asSeenFrom
code
// bug contribution #12

trait P[a<:P[a,t1],t1]:a;

object X
{
  type A[t1] = P[A[t1],t1];
}
what happened
Exception in thread "main" java.lang.StackOverflowError
        at scalac.symtab.Symbol.rawInfoAt(Symbol.java:882)
        at scalac.symtab.Symbol.rawInfo(Symbol.java:866)
        at scalac.symtab.Symbol.info(Symbol.java:840)
        at scalac.symtab.Symbol.type(Symbol.java:964)
        at scalac.symtab.TypeSymbol.type(Symbol.java:1589)
        at scalac.symtab.ClassSymbol.typeOfThis(Symbol.java:1901)
        at scalac.symtab.Type.singleDeref(Type.java:344)
        at scalac.symtab.Type.baseType(Type.java:1217)
        at scalac.symtab.Type.toPrefix(Type.java:1351)
        at scalac.symtab.Type$AsSeenFromMap.apply(Type.java:1286)
        at scalac.symtab.Type$AsSeenFromMap.apply(Type.java:1295)
        at scalac.symtab.Type.asSeenFrom(Type.java:1361)
        at scalac.symtab.Type$AsSeenFromMap.apply(Type.java:1289)
        at scalac.symtab.Type$Map.map(Type.java:1140)
        at scalac.symtab.Type$AsSeenFromMap.apply(Type.java:1296)
        at scalac.symtab.Type.asSeenFrom(Type.java:1361)
        at scalac.symtab.Type$AsSeenFromMap.apply(Type.java:1289)
        at scalac.symtab.Type$Map.map(Type.java:1140)
what expected silent compilation
[back to overview]
Changes of this bug report
Nikolay  edited on  2004-01-26 10:21:47.0
Martin  edited on  2004-01-30 16:29:35.0
I get: test/files/pos/bug283.scala:7: illegal cyclic reference involving constructor A type A[t1] = P[A[t1],t1]; ^ one error found ???