Skip to content

Commit

Permalink
test: add a test to confirm scala/scala#10644 is forward-ported
Browse files Browse the repository at this point in the history
  • Loading branch information
i10416 committed Feb 25, 2024
1 parent 1d65c5b commit d84b3ca
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/test/dotc/run-test-pickling.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ t6138
t6138-2
i12656.scala
trait-static-forwarder
i17255

13 changes: 13 additions & 0 deletions tests/run/i17255/J.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package p;

public class J {
public static J j = new J();
public static p.J f() {
return p.J.j;
}
public static p.Module$ module() {
return p.Module$.MODULE$;
}

public String toString() { return "J"; }
}
10 changes: 10 additions & 0 deletions tests/run/i17255/Module.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package p {
object Module {
override def toString = "Module"
}
}

object Test extends App {
assert(p.J.f().toString == "J")
assert(p.J.module().toString == "Module")
}

0 comments on commit d84b3ca

Please sign in to comment.