[Nice-commit] Nice/testsuite/compiler/statements/variables typeInference.testsuite,NONE,1.1
Brought to you by:
bonniot
|
From: <bo...@us...> - 2003-04-28 15:49:32
|
Update of /cvsroot/nice/Nice/testsuite/compiler/statements/variables
In directory sc8-pr-cvs1:/tmp/cvs-serv20549/testsuite/compiler/statements/variables
Added Files:
typeInference.testsuite
Log Message:
Restricted variables for which type is inferred to have a monomorphic type.
This avoids the polymorphic reference problem, in a restrictive manner.
--- NEW FILE: typeInference.testsuite ---
/// PASS
final x = 3;
int y = x + 1;
/// FAIL
// An incorrect use of a polymorphic reference.
final /* /// FAIL HERE */ l = new ArrayList();
l.add("Hello");
java.io.File f = l.get(0);
|