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 {
930930 // - we don't want TypeComparer constraining these TypeVars
931931 val poly = PolyType (DepParamName .fresh(sym.name.toTypeName) :: Nil )(
932932 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
934934 case _ => TypeBounds .empty
935935 }) :: Nil ,
936936 pt => defn.AnyType )
Original file line number Diff line number Diff line change @@ -21,5 +21,37 @@ object Test2 {
2121 }
2222
2323 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 ]]
2557}
You can’t perform that action at this time.
0 commit comments