[#578] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Lex | Martin | fixed | 2006-04-27 10:52:25.0 | |
subject | None versus None.type | |||
code |
object Test { val x = Nil val x2: Nil = x val y = None val y2:None = y Console.println("Okay") } |
|||
what happened | nt.scala:3 error: type mismatch; found : scala.Nil.type (with underlying type scala.Nil) required: scala.Nil val x2: Nil = x ^ nt.scala:5 error: type mismatch; found : scala.None.type (with underlying type scala.None) required: scala.None val y2:None = y ^ two errors found |
|||
what expected | If a singleton object can be used as a type, then surely that type should include the singleton object.... | |||
[back to overview] |
Martin edited on 2006-04-27 18:34:47.0 |