Skip to content

Commit abffedc

Browse files
committed
Add other cases fixed by js backend fix
1 parent c6e103a commit abffedc

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

tests/run/i17332.scala

Lines changed: 18 additions & 0 deletions
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

Lines changed: 16 additions & 0 deletions
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

Lines changed: 0 additions & 2 deletions
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)