Martin edited on 2006-08-20 13:20:58.0
|
We can change this, but only if the pattern matcher treats case objects specially. Right now, I believe it it would translate this into an equality test
if (t == IntType)
The problem is that equality does not imply that the operands
have the same type. I.e. we could write an IntType object as:
object IntType {
def equals(other: Any) = true
}
If the pattern matcher translates this into an `eq' test instead, we can assume that the types of the operands are
the same, and subsequently can strengthen the type checker.
So I reassigned to Burak for the moment. He should reassign to me once he is done. Also, we should discuss at a Scala meeting.
|
Burak edited on 2006-10-11 14:47:55.0
|
Pattern matcher uses eq for objects for some time now, so I reassign to Martin.
|
Martin edited on 2006-10-31 11:14:24.0
|
case object now have GADT effects
|