Updates jsinterop the check in MakesCallsStatic.

Earlier check was suspicious as it was only performed for JsType
methods but not JsFunction methods. Then I noticed that I cannot
reproduce the problem but removing the check was breaking the
compiler and causing an exception while performing inlining of
super calls to jstype prototypes. This is because those super
calls were incorrectly being tried to statified.
Patch replaces the special case so calls to JsType prototypes are
no longer statified.

Change-Id: Ic0dfb79d7b425b5961a2bbb85f542df95fbbd920
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java b/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
index 3dd59a0..2e4570b 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
@@ -309,7 +309,7 @@
         return false;
       }
 
-      if (method.isOrOverridesJsTypeMethod()) {
+      if (program.isJsTypePrototype(method.getEnclosingType())) {
         return false;
       }
 
diff --git a/user/test/com/google/gwt/core/client/interop/JsFunctionTest.java b/user/test/com/google/gwt/core/client/interop/JsFunctionTest.java
index 8ea042a..0393fc1 100644
--- a/user/test/com/google/gwt/core/client/interop/JsFunctionTest.java
+++ b/user/test/com/google/gwt/core/client/interop/JsFunctionTest.java
@@ -48,6 +48,17 @@
     assertEquals(12, jsFunctionInterface.foo(10));
   }
 
+  public void testJsFunctionBasic_javaAndJs() {
+    MyJsFunctionInterface jsFunctionInterface = new MyJsFunctionInterface() {
+      @Override
+      public int foo(int a) {
+        return a + 2;
+      }
+    };
+    assertEquals(12, jsFunctionInterface.foo(10));
+    assertEquals(13, callAsFunction(jsFunctionInterface, 11));
+  }
+
   public void testJsFunctionViaFunctionMethods() {
     MyJsFunctionInterface jsFunctionInterface = new MyJsFunctionInterface() {
       @Override