File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -930,7 +930,7 @@ object Contexts {
930
930
// - we don't want TypeComparer constraining these TypeVars
931
931
val poly = PolyType (DepParamName .fresh(sym.name.toTypeName) :: Nil )(
932
932
pt => (sym.info match {
933
- case tb @ TypeBounds (lo , hi) if (lo eq defn. NothingType ) && hi.isLambdaSub => tb
933
+ case tb @ TypeBounds (_ , hi) if hi.isLambdaSub => tb
934
934
case _ => TypeBounds .empty
935
935
}) :: Nil ,
936
936
pt => defn.AnyType )
Original file line number Diff line number Diff line change @@ -21,5 +21,37 @@ object Test2 {
21
21
}
22
22
23
23
implicit val li : List [Int ] = List (1 , 2 , 3 )
24
- bar[Foo [List ]]
24
+ val lii = bar[Foo [List ]]
25
+ }
26
+
27
+ object Test3 {
28
+ inline def summon [T ] = implicit match {
29
+ case t : T => t
30
+ }
31
+
32
+ type K1Top = [t] => Any
33
+
34
+ class Foo [F <: K1Top ]
35
+
36
+ inline def bar [T ] = inline erasedValue[T ] match {
37
+ case _ : Foo [f] => summon[f[Int ]]
38
+ }
39
+
40
+ implicit val li : List [Int ] = List (1 , 2 , 3 )
41
+ val lii = bar[Foo [List ]]
42
+ }
43
+
44
+ object Test4 {
45
+ inline def summon [T ] = implicit match {
46
+ case t : T => t
47
+ }
48
+
49
+ class Foo [F [t] >: List [t]]
50
+
51
+ inline def bar [T ] = inline erasedValue[T ] match {
52
+ case _ : Foo [f] => summon[f[Int ]]
53
+ }
54
+
55
+ implicit val li : List [Int ] = List (1 , 2 , 3 )
56
+ val lii = bar[Foo [List ]]
25
57
}
You can’t perform that action at this time.
0 commit comments