Aladdin - Scala Bugtracking
[#468] project: nsc priority: medium category: bug
submitter assigned to status date submitted
Burak Stephane fixed 2005-10-28 15:02:00.0
subject (script-bug) comparison ops have wrong type
code
object foo {
  def isLetter(ch:Char) = ch>='A' && ch<='Z';

  def isLetter2(ch:Char) = ch>'A' && ch<'Z';
}
what happened
(using 5cr1p7-haX0R from distrib/unix/latest...)

te.scala:2: overloaded method value >= with alternatives (scala.Int)scala.Boolean <and> (scala.Long)scala.\
Boolean  (scala.Float)scala.Boolean <and> (scala.Double)scala.Boolean cannot be applied to (scala.Cha\
r)
  def isLetter(ch:Char) = ch>='A' && ch<='Z';
                            ^
te.scala:4: overloaded method value > with alternatives (scala.Int)scala.Boolean  (scala.Long)scala.Boolean\
 <and> (scala.Float)scala.Boolean  (scala.Double)scala.Boolean cannot be applied to (scala.Char)
  def isLetter2(ch:Char) = ch>'A' && ch<'Z';
                             ^
two errors found
what expected
[back to overview]
Changes of this bug report
Burak  edited on  2005-10-30 23:09:47.0
This bug was due to some script problem.
Gilles  edited on  2005-11-01 13:00:17.0