[Nice-commit] Nice/src/bossa/syntax analyse.nice,1.96,1.97
Brought to you by:
bonniot
From: <ar...@us...> - 2003-12-12 23:20:42
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv4603/F:/nice/src/bossa/syntax Modified Files: analyse.nice Log Message: Small refactoring. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** analyse.nice 12 Dec 2003 22:08:33 -0000 1.96 --- analyse.nice 12 Dec 2003 23:20:39 -0000 1.97 *************** *** 444,479 **** if (sym != null) { ! if (e.alwaysOverloadedSymbol) ! { ! if (sym instanceof MonoSymbol) ! { ! sym.used = true; ! ! if (sym instanceof Block.LocalVariable.Symbol) ! checkInitialized(sym, info, e.location()); ! } ! ! return new OverloadedSymbolExp(sym, e.ident); ! } ! else { ! if (sym instanceof MonoSymbol) ! { ! sym.used = true; ! ! if (assigned && sym.depth < info.anonFunDepth) ! sym.captured = true; ! if (sym instanceof Block.LocalVariable.Symbol) ! { ! if (assigned) ! setInitialized(sym, info, e.location()); ! else ! checkInitialized(sym, info, e.location()); ! } ! } ! return new SymbolExp(sym, e.location()); } } } --- 444,467 ---- if (sym != null) { ! if (sym instanceof MonoSymbol) { ! sym.used = true; ! if (assigned && sym.depth < info.anonFunDepth) ! sym.captured = true; ! if (sym instanceof Block.LocalVariable.Symbol) ! { ! if (assigned) ! setInitialized(sym, info, e.location()); ! else ! checkInitialized(sym, info, e.location()); ! } } + + if (e.alwaysOverloadedSymbol) + return new OverloadedSymbolExp(sym, e.ident); + else + return new SymbolExp(sym, e.location()); } } |