File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/reflect/scala/reflect/internal/tpe Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,16 @@ private[internal] trait TypeMaps {
101
101
case tr @ TypeRef (pre, sym, args) =>
102
102
val pre1 = this (pre)
103
103
val args1 = (
104
- if (trackVariance && args.nonEmpty && ! variance.isInvariant && sym.typeParams.nonEmpty)
105
- mapOverArgs(args, sym.typeParams)
106
- else
104
+ if (trackVariance && args.nonEmpty && ! variance.isInvariant) {
105
+ val tparams = sym.typeParams
106
+ if (tparams.isEmpty)
107
+ args mapConserve this
108
+ else
109
+ mapOverArgs(args, tparams)
110
+ } else {
107
111
args mapConserve this
108
- )
112
+ }
113
+ )
109
114
if ((pre1 eq pre) && (args1 eq args)) tp
110
115
else copyTypeRef(tp, pre1, tr.coevolveSym(pre1), args1)
111
116
case ThisType (_) => tp
You can’t perform that action at this time.
0 commit comments