< prev index next >

src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java

Print this page

        

*** 341,351 **** if (!isLocal(function, symbol)) { // Not defined in this function. Create a new definition. symbol = null; } else if (symbol.isParam()) { // Duplicate parameter. Null return will force an error. ! throw new AssertionError("duplicate parameter"); } } else if (isVar) { if (isBlockScope) { // Check redeclaration in same block if (symbol.hasBeenDeclared()) { --- 341,351 ---- if (!isLocal(function, symbol)) { // Not defined in this function. Create a new definition. symbol = null; } else if (symbol.isParam()) { // Duplicate parameter. Null return will force an error. ! throwParserException(ECMAErrors.getMessage("syntax.error.duplicate.parameter", name), origin); } } else if (isVar) { if (isBlockScope) { // Check redeclaration in same block if (symbol.hasBeenDeclared()) {
< prev index next >