Skip to content

Commit 529c95a

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

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
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

0 commit comments

Comments
 (0)