Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
scabug opened this issue Nov 5, 2011 · 2 comments
Assignees

Comments

@scabug
Copy link

scabug commented Nov 5, 2011

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.

@scabug
Copy link
Author

scabug commented Nov 5, 2011

Imported From: https://issues.scala-lang.org/browse/SI-5152?orig=1
Reporter: @jsalvata
Affected Versions: 2.9.0-1, 2.9.2
Attachments:

@scabug
Copy link
Author

scabug commented Nov 7, 2011

Commit Message Bot (anonymous) said:
(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 #5152, review by moors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants