[#1039] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Adriaan | fixed | 2007-04-10 13:39:01.0 | |
subject | Assertion error in type checker | |||
code |
object test extends Application { 0.asInstanceof[Long] } |
|||
what happened | test.scala:2: error: value asInstanceof is not a member of scala.Int 0.asInstanceof[Long] ^ Exception in thread "main" java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:85) at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2310) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2522) at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2555) at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1341) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$56.apply(Typers.scala:1370) at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$56.apply(Typers.scala:1370) at scala.List$.loop$0(List.scala:243) [...] |
|||
what expected | no assertion error | |||
[back to overview] |
Stephane edited on 2007-04-10 15:46:42.0 |
ok in 2.4.0-final |
Martin edited on 2007-04-12 15:25:25.0 |
This looks like it's related to higher-kindedness. Reassigned to Adriaan. For the moment all bugs related to type applications should probably be directed to Adriaan :-) |
Adriaan edited on 2007-04-12 16:32:11.0 |
The assert in `case TypeApply' in `typed1' was too strict (only allowed `args.length != tparams.length' for unresolved overloaded type) apparently also necessary when the type is an error. |
Adriaan edited on 2007-04-12 16:33:20.0 |
err... I meant overloaded *symbol* and error *symbol*, not "type" |