< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java
Print this page
@@ -341,11 +341,11 @@
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");
+ 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 >