We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6e103a commit 529c95aCopy full SHA for 529c95a
tests/run/i17332.scala
@@ -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
tests/run/19394.scala renamed to tests/run/i19394.scala
tests/run/i19396.scala
@@ -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
0 commit comments