@@ -7,6 +7,7 @@ import dotty.tools.dotc.core.Contexts.{*, given}
77import dotty .tools .dotc .core .Decorators .{* , given }
88import dotty .tools .dotc .core .Symbols .*
99import dotty .tools .dotc .core .Types .*
10+ import dotty .tools .dotc .ast .tpd .*
1011import dotty .tools .dotc .typer .ProtoTypes .constrained
1112
1213import org .junit .Test
@@ -18,8 +19,8 @@ class ConstraintsTest:
1819 @ Test def mergeParamsTransitivity : Unit =
1920 inCompilerContext(TestConfiguration .basicClasspath,
2021 scalaSources = " trait A { def foo[S, T, R]: Any }" ) {
21- val tp = constrained(requiredClass(" A" ).typeRef.select(" foo" .toTermName).info.asInstanceOf [TypeLambda ])
22- val List (s, t, r) = tp.paramRefs
22+ val tvars = constrained(requiredClass(" A" ).typeRef.select(" foo" .toTermName).info.asInstanceOf [TypeLambda ], EmptyTree , alwaysAddTypeVars = true )._2
23+ val List (s, t, r) = tvars.tpes
2324
2425 val innerCtx = ctx.fresh.setExploreTyperState()
2526 inContext(innerCtx) {
@@ -37,8 +38,8 @@ class ConstraintsTest:
3738 @ Test def mergeBoundsTransitivity : Unit =
3839 inCompilerContext(TestConfiguration .basicClasspath,
3940 scalaSources = " trait A { def foo[S, T]: Any }" ) {
40- val tp = constrained(requiredClass(" A" ).typeRef.select(" foo" .toTermName).info.asInstanceOf [TypeLambda ])
41- val List (s, t) = tp.paramRefs
41+ val tvars = constrained(requiredClass(" A" ).typeRef.select(" foo" .toTermName).info.asInstanceOf [TypeLambda ], EmptyTree , alwaysAddTypeVars = true )._2
42+ val List (s, t) = tvars.tpes
4243
4344 val innerCtx = ctx.fresh.setExploreTyperState()
4445 inContext(innerCtx) {
0 commit comments