Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ object GenericSignatures {
builder.append("*")
else
// For bounded arguments, we can't translate it cleanly so emit an erased type
jsig(erasure(a.tycon))
boxedSig(erasure(a.tycon))
case res =>
// value classes cannot appear as generic arguments
jsig(res, vcBoxing = ValueClassBoxing.Box)
Expand Down
1 change: 1 addition & 0 deletions tests/generic-java-signatures/26786.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public Check<java.lang.Boolean> X.foo()
14 changes: 14 additions & 0 deletions tests/generic-java-signatures/26786.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import compiletime.ops.int.>

trait Check[Cond[T <: Int] <: Boolean]:
def apply(arg: Int): Unit

type CondT = [t <: Int] =>> t > 0

class X:
val foo: Check[CondT] = new Check[CondT]:
def apply(arg: Int): Unit = ()

object Test:
def main(args: Array[String]): Unit =
classOf[X].getMethods.filter(_.getName.contains("foo")).sortBy(_.getName).foreach(m => println(m.toGenericString))
Loading