[Nice-commit] Nice/testsuite/compiler/statements/variables bytecode.testsuite,NONE,1.1
Brought to you by:
bonniot
|
From: <bo...@us...> - 2003-03-06 01:47:24
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements/variables
In directory sc8-pr-cvs1:/tmp/cvs-serv31458/testsuite/compiler/statements/variables
Added Files:
bytecode.testsuite
Log Message:
Do not assign a default value to local variables without initializers.
The compiler already guarantees that they will be assigned before use anyway.
--- NEW FILE: bytecode.testsuite ---
/// PASS
assert foo([1.0,2.0], true) == 1.0;
/// Toplevel
<Any T | T <: double, int <: T >
T foo(T[] a, boolean first)
{
T res;
if (first)
res = a[0];
else
res = a[1];
return res;
}
/// PASS
?String foo = null;
assert foo == null;
|