Skip to content

Commit 398ffc5

Browse files
dwijnandWojciechMazur
authored andcommitted
Add other cases fixed by js backend fix
[Cherry-picked abffedc]
1 parent d54ba6d commit 398ffc5

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

tests/run/i17332.scala

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package foo {
2+
3+
import annotation.static
4+
5+
class MirrorHelpers
6+
7+
object MirrorHelpers:
8+
9+
@static
10+
def throwStuff(i: Int): Any = throw new NoSuchElementException(String.valueOf(i))
11+
12+
}
13+
14+
@main def Test =
15+
try
16+
foo.MirrorHelpers.throwStuff(23)
17+
??? // ko
18+
catch case ex: NoSuchElementException if ex.getMessage == "23" => () // ok
File renamed without changes.

tests/run/i19396.scala

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import scala.annotation.static
2+
3+
class Foo
4+
5+
object Foo {
6+
@static def foo = "foo"
7+
}
8+
9+
class Bar {
10+
def bar = Foo.foo
11+
}
12+
13+
object Test:
14+
def main(args: Array[String]): Unit =
15+
Foo.foo
16+
Bar().bar

tests/run/static/i2054.scala

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// scalajs: --skip --pending
2-
31
import scala.annotation.static
42

53
class Test

0 commit comments

Comments
 (0)