[Nice-commit] Nice/src/bossa/syntax Block.java,1.51,1.52
Brought to you by:
bonniot
From: <ar...@us...> - 2003-02-19 21:56:38
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv17572/F:/nice/src/bossa/syntax Modified Files: Block.java Log Message: bug: A final local variable that is uninitialized causes a CCE in the compiler. fix: Give error message when the final variable is not initialized. Index: Block.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Block.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Block.java 20 Jan 2003 19:21:00 -0000 1.51 --- Block.java 19 Feb 2003 21:56:30 -0000 1.52 *************** *** 118,124 **** this.value = value; if (constant) ! this.left = new MonoSymbol(name,type) { ! boolean isAssignable() { return false; } ! }; else this.left = new LocalVariable.Symbol(name,type); --- 118,127 ---- this.value = value; if (constant) ! if (value == null) ! throw User.error(name, "A final variable cannot be uninitialized."); ! else ! this.left = new MonoSymbol(name,type) { ! boolean isAssignable() { return false; } ! }; else this.left = new LocalVariable.Symbol(name,type); |