Roberto Lublinerman has uploaded a new change for review.

  https://gwt-review.googlesource.com/1850


Change subject: Missing overrides if JNonNullType made signatures for same types differ.
......................................................................

Missing overrides if JNonNullType made signatures for same types differ.

This resulted in a very obscure error that occurred in an invalid JavaScript identifier under -style DETAILED if
a method with array parameters was translated as a global JavaScript method.

Change-Id: I062a3592d0a9a3ef390b1e946e013bdf3cb26791
---
M dev/core/src/com/google/gwt/dev/jjs/ast/JNonNullType.java
M dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java
2 files changed, 27 insertions(+), 0 deletions(-)



diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JNonNullType.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JNonNullType.java
index e87aff2..1667658 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JNonNullType.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JNonNullType.java
@@ -40,6 +40,16 @@
   }

   @Override
+  public String getJavahSignatureName() {
+    return ref.getJavahSignatureName();
+  }
+
+  @Override
+  public String getJsniSignatureName() {
+    return ref.getJsniSignatureName();
+  }
+
+  @Override
   public JNonNullType getNonNull() {
     return this;
   }
diff --git a/dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java b/dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java
index 3ed9a94..872621a 100644
--- a/dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java
+++ b/dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java
@@ -20,6 +20,7 @@
 import com.google.gwt.dev.jjs.ast.JClassType;
 import com.google.gwt.dev.jjs.ast.JInterfaceType;
 import com.google.gwt.dev.jjs.ast.JNonNullType;
+import com.google.gwt.dev.jjs.ast.JNullType;
 import com.google.gwt.dev.jjs.ast.JProgram;
 import com.google.gwt.dev.jjs.ast.JReferenceType;
 import com.google.gwt.dev.jjs.ast.JTypeOracle;
@@ -200,6 +201,22 @@
     }
   }

+  public void testJavahSignatures() {
+    for (JReferenceType type : severalTypes()) {
+      if (!(type instanceof JNullType)) {
+ assertEquals(type.getJavahSignatureName(), type.getNonNull().getJavahSignatureName());
+      }
+    }
+  }
+
+  public void testJsniSignatures() {
+    for (JReferenceType type : severalTypes()) {
+      if (!(type instanceof JNullType)) {
+ assertEquals(type.getJsniSignatureName(), type.getNonNull().getJsniSignatureName());
+      }
+    }
+  }
+
   public void testStrongerType() {
     assertSame(classA, program.strongerType(classA, classA));
     assertSame(classBnn, program.strongerType(classB, classBnn));

--
To view, visit https://gwt-review.googlesource.com/1850
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I062a3592d0a9a3ef390b1e946e013bdf3cb26791
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman <rlu...@google.com>

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to