summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/fields/private-method-static.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/fields/private-method-static.js')
-rw-r--r--js/src/jit-test/tests/fields/private-method-static.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/fields/private-method-static.js b/js/src/jit-test/tests/fields/private-method-static.js
new file mode 100644
index 0000000000..17b5f1e130
--- /dev/null
+++ b/js/src/jit-test/tests/fields/private-method-static.js
@@ -0,0 +1,28 @@
+
+class B {
+ static #smethod() {
+ return 14;
+ }
+
+ static f() {
+ return this.#smethod();
+ }
+}
+assertEq(B.f(), 14);
+
+
+
+class OuterStatic {
+ static #outerMethod() { return "ok"; }
+
+ static test() {
+ class Inner {
+ #innerMethod() { }
+ static test(outer) {
+ return outer.#outerMethod();
+ }
+ }
+ return Inner.test(this);
+ }
+}
+assertEq(OuterStatic.test(), "ok"); \ No newline at end of file