Make local param shadowing detection print a warning instead of throwing a SyntaxError. This way it's easier to test that particular scenario, since this is actually a bug in the Preprocessor.

This commit is contained in:
Paul Baumgart committed 2010-09-24 15:03:22 -07:00
1 parent 8de508381a
commit 0802b80c35
1 file changed
+1 -1
+1 -1
View File
@@ -670,7 +670,7 @@ Preprocessor.prototype.method = function(/*Lexer*/ tokens, ivar_names)
parameters[parameters.length] = token;
if (token in ivar_names)
throw new SyntaxError(this.error_message("*** Method ( "+selector+" ) uses a parameter name that is already in use ( "+token+" )"));
CPLog.warn(this.error_message("*** Warning: Method ( "+selector+" ) uses a parameter name that is already in use ( "+token+" )"));
}
else if (token == TOKEN_OPEN_PARENTHESIS)
{