Scala Programming Language
  1. Scala Programming Language
  2. SI-5152

Compiler crash "typeConstructor inapplicable for <none>" compiling incorrect code

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0-1, Scala 2.9.2
    • Fix Version/s: None
    • Component/s: Misc Compiler
    • Labels:
      None
    • Environment:

      Ubuntu Linux. Java HotSpot(TM) Server VM, Java 1.6.0_29
      Build from trunk commit e04aed52997062d567deeb3d14a700bb54a7415b (5th nov 17:16:40)

      Also reproduced on Scala version 2.9.0.1 (Ubuntu dist.)

      Description

      Try to compile this:

      object Test {
        new C
        class A[E[_]] { }
        class B[E[_]] extends A[B] { }
        class C extends B { } 
      }
      

      and you'll get:

      error: java.lang.Error: typeConstructor inapplicable for <none>
      	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:33)
      	at scala.reflect.internal.Symbols$Symbol.typeConstructor(Symbols.scala:1043)
      	at scala.reflect.internal.Symbols$TypeSymbol$$anonfun$6.apply(Symbols.scala:2154)
      	at scala.reflect.internal.Symbols$TypeSymbol$$anonfun$6.apply(Symbols.scala:2154)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
      	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      	at scala.collection.immutable.List.foreach(List.scala:77)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
      	at scala.collection.immutable.List.map(List.scala:77)
      	at scala.reflect.internal.Symbols$TypeSymbol.tpe(Symbols.scala:2154)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$parentTypes$1.apply(Typers.scala:1164)
      	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$parentTypes$1.apply(Typers.scala:1164)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
      	at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      	at scala.collection.immutable.List.foreach(List.scala:77)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
      	at scala.collection.immutable.List.map(List.scala:77)
      	at scala.tools.nsc.typechecker.Typers$Typer.parentTypes(Typers.scala:1164)
      	at scala.tools.nsc.typechecker.Namers$Namer.templateSig(Namers.scala:810)
      [...]
      Exception in thread "main" java.lang.Error: typeConstructor inapplicable for <none>
      	at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:33)
      [...]
      

      Full trace attached.

        Issue Links

          Activity

          Hide
          Commit Message Bot added a comment -

          (extempore in r25953) Fix crash with HK types.

          Another page in the storied history of "call .tpe when one should have
          called .tpeHK", in this case leading to a crash of stacktraciness.
          Closes SI-5152, review by moors.

          Show
          Commit Message Bot added a comment - (extempore in r25953 ) Fix crash with HK types. Another page in the storied history of "call .tpe when one should have called .tpeHK", in this case leading to a crash of stacktraciness. Closes SI-5152 , review by moors.

            People

            • Assignee:
              Paul Phillips
              Reporter:
              Jordi Salvat i Alabart
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development