Aladdin - Scala Bugtracking
[#219] project: compiler priority: low category: feature
submitter assigned to status date submitted
Burak Martin won't fix 2003-11-07 11:05:06.0
subject can an instance of value type be equal to a class ?
code
case class ga;
object foo { 
  val t:int = 0;
  if (t==ga) {
  } else {
  }
}
what happened
this program compiles without error.
what expected an error, ga is not a value. it is not be possible to compare instances and types.
[back to overview]
Changes of this bug report
Burak  edited on  2003-11-07 11:35:25.0

after thinking around the corner, I realized that in fact t is compared to the constructor which is of course a value. updating category to feature and status to won't fix.