[#869] | project: specification | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Sean | Martin | open | 2006-12-17 16:32:33.0 | |
subject | var initialization null loophole. | |||
code |
object Test { class Foo[T] { // var x : T = null; var x : T = _; } def main(args : Array[String]) : Unit = { Console.println("Hello " + (new Foo[String]).x); } } |
|||
what happened | Running the program: "Hello null" |
|||
what expected | underscore is just another name for null in this case. | |||
[back to overview] |
Martin edited on 2006-12-22 12:47:40.0 |
this should be solved when we change the initialization scheme. |