Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv29972/F:/nice/src/bossa/syntax
Modified Files:
MethodBodyDefinition.java
Log Message:
The name of a parameter of a default implementation should match the declaration.
Index: MethodBodyDefinition.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodBodyDefinition.java,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -d -r1.131 -r1.132
*** MethodBodyDefinition.java 19 Jun 2003 15:32:00 -0000 1.131
--- MethodBodyDefinition.java 4 Jul 2003 23:56:21 -0000 1.132
***************
*** 270,273 ****
--- 270,286 ----
}
+ outer: for(Iterator it = symbols.iterator(); it.hasNext();) {
+ MethodDeclaration m = ((MethodDeclaration.Symbol) it.next()).getDefinition();
+ if( m instanceof NiceMethod) {
+ FormalParameters params = m.formalParameters();
+ for (int i = params.hasThis() ? 1 : 0; i < formals.length; i++)
+ if (formals[i].atAny() && formals[i].name != null && params.getName(i) != null &&
+ !formals[i].name.toString().equals(params.getName(i).toString())) {
+ it.remove();
+ continue outer;
+ }
+ }
+ }
+
if(symbols.size() == 1)
return (VarSymbol) symbols.get(0);
|