Add repro for missing restriction check.
.
@@ -1249,11 +1249,15 @@ public class JsInteropRestrictionsCheckerTest extends TestCase {
assertTranspileFails(
"Buggy",
"import jsinterop.annotations.*;",
- "@JsType(namespace = \"a.b.\") public class Buggy {",
+ "@JsType class Super {",
+ " @JsMethod(name = \"custom\") public void r() {}",
+ "}",
+ "@JsType(namespace = \"a.b.\") public class Buggy extends Super{",
" @JsMethod(namespace = \"34s\") public native static void m();",
" @JsMethod(namespace = \"\") public native static void o();",
" @JsProperty(namespace = \"\") public int p;",
" @JsMethod(namespace = \"a\") public void q() {}",
+ " @JsMethod(namespace = \"b\") public void r() {}",
"}",
"@JsType(isNative = true) class NativeClass {",
" @JsProperty(namespace = \"s^\") public static int n;",
@@ -1276,6 +1280,8 @@ public class JsInteropRestrictionsCheckerTest extends TestCase {
"'void Buggy.o()' cannot have an empty namespace.",
"Instance member 'Buggy.p' cannot declare a namespace.",
"Instance member 'void Buggy.q()' cannot declare a namespace.",
+ // TODO(b/134589091): uncomment when bug is fixed.
+ // "Instance member 'void Buggy.r()' cannot declare a namespace.",
"'NativeClass.n' has invalid namespace 's^'.",
"Non-native member 'JsTypeOnWindow.r' cannot declare a namespace.",
"Non-native member 'void JsTypeOnWindow.s()' cannot declare a namespace.",
