| [#212] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Stephane | Michel | fixed | 2003-10-27 13:15:11.0 | |
| subject | ClassCastException | |||
| code |
<pre>object Test {
def foo(x: Array[Int]) = {
def bar(x: Array[Int]): Array[Int] = {
var newX = new Array[Int](x.length);
for (val i <- List.range(0, newX.length)) do { newX(i) = x(i) };
newX
}
bar(x)
}
def main(args: Array[String]) = {
val xs = new Array[Int](2);
xs(0) = 1; xs(1) = 4;
val ys = foo(xs);
}
}
</pre> |
|||
| what happened | |
|||
| what expected | No runtime error. | |||
| [back to overview] | ||||
| Michel edited on 2003-11-24 11:06:31.0 |
| I cannot reproduce this with the current CVS. It must have been fixed accidentally (I like that). |