File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ i10846.V: scala.Option<i10846.V>
2
+ i10846.U: scala.Option<i10846.U>
3
+ i10846.W: scala.Option<i10846.W<scala.Function1<java.lang.Object, java.lang.String>>>
Original file line number Diff line number Diff line change
1
+ package i10846 {
2
+ final class V (val x : Int ) extends AnyVal
3
+ object V { def get : Option [V ] = null }
4
+
5
+ final class U (val y : String ) extends AnyVal
6
+ object U { def get : Option [U ] = null }
7
+
8
+ final class W [T ](val z : T ) extends AnyVal
9
+ object W { def get : Option [W [Int => String ]] = null }
10
+ }
11
+
12
+
13
+ object Test extends scala.App {
14
+ def check [T ](implicit tt : reflect.ClassTag [T ]): Unit = {
15
+ val companion = tt.runtimeClass.getClassLoader.loadClass(tt.runtimeClass.getName + '$' )
16
+ val get = companion.getMethod(" get" )
17
+ assert(get.getReturnType == classOf [Option [_]])
18
+ println(s " ${tt.runtimeClass.getName}: ${get.getGenericReturnType}" )
19
+ }
20
+
21
+ import i10846 ._
22
+
23
+ check[V ]
24
+ check[U ]
25
+ check[W [_]]
26
+ }
You can’t perform that action at this time.
0 commit comments