-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add other cases fixed by js backend fix
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// scalajs: --skip --pending | ||
|
||
import scala.annotation.static | ||
|
||
class Test | ||
|