Aladdin - Scala Bugtracking
[#345] project: compiler priority: low category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2004-06-15 18:16:01.0
subject problem with type inference
code
object test with Application {
  val x = List();
  val y = x.length > 0;      // OK
  val z1 = Nil.length > 0;   // OK
  val z2 = List().length > 0; // ERROR
}
what happened
test.scala:5: method > of type [A](scala.Double)scala.Boolean
   (scala.Float)scala.Boolean
   (scala.Long)scala.Boolean
   (scala.Int)scala.Boolean cannot be applied to (scala.Int)
  val z2 = List().length > 0; // ERROR
what expected no compiler error
[back to overview]
Changes of this bug report
Stephane  edited on  2004-06-15 18:16:28.0
Martin  edited on  2004-07-01 15:50:07.0