Created
May 21, 2019 09:20
-
-
Save xuwei-k/0b9b8a3cce76cd077af4c0b948078d7d to your computer and use it in GitHub Desktop.
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
object A { | |
trait B { | |
case class C(a1: Int, a2: Option[Int]) | |
} | |
object D extends B | |
} | |
object Main { | |
def main(args: Array[String]): Unit = { | |
println(scala.util.Properties.versionString) | |
val c = classOf[A.D.C].getConstructors.head | |
println(c.getGenericParameterTypes.toList) | |
println(c.getParameters.toList) | |
// 2.13.0-RC1, 2.12.8 | |
// List(interface A$B, int, scala.Option<java.lang.Object>) | |
// List(final A$B $outer, final A$B a1, final int a2) | |
// 2.13.0-RC2 | |
// List(int, scala.Option<java.lang.Object>) | |
// List(final A$B $outer, final int a1, final scala.Option<java.lang.Object> a2) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment