[Nice-commit] Nice/src/bossa/syntax Pattern.java,1.84,1.85
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-07-05 07:55:35
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23006/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Bugfix: avoid global symbols being added multiple times to a scope when they are used as patterns. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Pattern.java 16 Jun 2004 10:00:37 -0000 1.84 --- Pattern.java 5 Jul 2004 07:55:23 -0000 1.85 *************** *** 214,223 **** if (sym instanceof EnumDefinition.EnumSymbol) { ! EnumDefinition.EnumSymbol symbol = (EnumDefinition.EnumSymbol)sym; ! NewExp val = (NewExp)symbol.getValue(); ! tc = val.tc; ! atValue = new ConstantExp(null, tc, symbol, name.toString(), location); return; } --- 214,225 ---- if (sym instanceof EnumDefinition.EnumSymbol) { ! EnumDefinition.EnumSymbol symbol = (EnumDefinition.EnumSymbol)sym; ! NewExp val = (NewExp)symbol.getValue(); ! tc = val.tc; ! atValue = new ConstantExp(null, tc, symbol, name.toString(), location); + refName = name; + name = null; return; } *************** *** 239,242 **** --- 241,245 ---- tc = val.tc; atValue = val; + name = null; } else if (symbol.getValue() instanceof NewExp) *************** *** 247,250 **** --- 250,255 ---- atValue = new ConstantExp(null, tc, symbol, name.toString(), location); + refName = name; + name = null; } else *************** *** 649,653 **** if (atReference()) ! return "@=" + name; if (atString()) --- 654,658 ---- if (atReference()) ! return "@=" + refName; if (atString()) |