| Index: compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
|
| diff --git a/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java b/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
|
| index b93d12ed2730b929c8a05f5e18edcf182904f45b..1778ab8d32f2bf155fd909d9c877dec15f005ce3 100644
|
| --- a/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
|
| +++ b/compiler/java/com/google/dart/compiler/backend/js/GenerateJavascriptAST.java
|
| @@ -2766,7 +2766,7 @@ public class GenerateJavascriptAST {
|
|
|
| if (method != null) {
|
| if (!generateDirectCallArgs(x, method, jsInvoke)) {
|
| - // Call cannot succeed. Return false to generate $nsme() in its place.
|
| + // Call cannot succeed. Generate $nsme() invocation.
|
| return AstUtil.newInvocation(new JsNameRef("$nsme"));
|
| }
|
| } else {
|
| @@ -2818,7 +2818,7 @@ public class GenerateJavascriptAST {
|
| for (VariableElement param : target.getParameters()) {
|
| String name = param.getName();
|
| if (name != null) {
|
| - DartExpression namedArg = namedArgs.get(param.getName());
|
| + DartExpression namedArg = namedArgs.remove(name);
|
| if (namedArg != null) {
|
| if (!param.getModifiers().isNamed()) {
|
| // Provided a named argument to a positional parameter.
|
| @@ -2842,6 +2842,11 @@ public class GenerateJavascriptAST {
|
| ++idx;
|
| }
|
|
|
| + // Caller specified a named argument that wasn't declared in the method definition.
|
| + if (!namedArgs.isEmpty()) {
|
| + return false;
|
| + }
|
| +
|
| if (posUsed != posArgs.size()) {
|
| // Unused positional arguments.
|
| return false;
|
| @@ -2989,7 +2994,7 @@ public class GenerateJavascriptAST {
|
|
|
| // Compile time constants expressions must be canonicalized.
|
| // We do this with the javascript native "$intern" method.
|
| - private JsExpression maybeInternConst(JsExpression newExpr, List<? extends Type> typeParams) {
|
| + private JsExpression maybeInternConst(JsExpression newExpr, List<Type> typeParams) {
|
| JsInvocation intern = AstUtil.newInvocation(new JsNameRef(INTERN_CONST_FUNCTION), newExpr);
|
| if (typeParams != null && typeParams.size() != 0) {
|
| JsArrayLiteral arr = new JsArrayLiteral();
|
|
|