mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
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:
1 parent
8de508381a
commit
0802b80c35
1 file changed
+1
-1
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user