Skip to content

Commit b8df544

Browse files
committed
Add regression test for Scala.js js.Tuple2 example
Since support for `isInstanceOf[Null]` is subject to change.
1 parent f70b899 commit b8df544

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/sjs-junit/test/org/scalajs/testsuite/compiler/RegressionTestScala3.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ object RegressionTestScala3 {
119119
def bar(x: Long = 0): Foo = new Foo(x)
120120
}
121121
}
122+
123+
object Issue14896 {
124+
val obj = new js.Object {
125+
val a = 42
126+
val b = "foo"
127+
}
128+
129+
val entries = js.Object.entries(obj)
130+
val js.Tuple2(k, v) = entries(0): @unchecked
131+
}
122132
}
123133

124134
// This class needs to be at the top-level, not in an object, to reproduce the issue

0 commit comments

Comments
 (0)