From 0802b80c355219cb6bcecc15193a95abab0a8a04 Mon Sep 17 00:00:00 2001 From: Paul Baumgart Date: Fri, 24 Sep 2010 15:03:22 -0700 Subject: [PATCH] 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. --- Objective-J/Preprocessor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objective-J/Preprocessor.js b/Objective-J/Preprocessor.js index 75ee38697..1aaa9e432 100644 --- a/Objective-J/Preprocessor.js +++ b/Objective-J/Preprocessor.js @@ -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) {