Skip to content

Commit

Permalink
Add other cases fixed by js backend fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Jan 12, 2024
1 parent c6e103a commit abffedc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
18 changes: 18 additions & 0 deletions tests/run/i17332.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package foo {

import annotation.static

class MirrorHelpers

object MirrorHelpers:

@static
def throwStuff(i: Int): Any = throw new NoSuchElementException(String.valueOf(i))

}

@main def Test =
try
foo.MirrorHelpers.throwStuff(23)
??? // ko
catch case ex: NoSuchElementException if ex.getMessage == "23" => () // ok
File renamed without changes.
16 changes: 16 additions & 0 deletions tests/run/i19396.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import scala.annotation.static

class Foo

object Foo {
@static def foo = "foo"
}

class Bar {
def bar = Foo.foo
}

object Test:
def main(args: Array[String]): Unit =
Foo.foo
Bar().bar
2 changes: 0 additions & 2 deletions tests/run/static/i2054.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// scalajs: --skip --pending

import scala.annotation.static

class Test
Expand Down

0 comments on commit abffedc

Please sign in to comment.