Skip to content

Commit 3eb6d92

Browse files
Blaisorbladeodersky
authored andcommitted
Simplify typeParams
Using `tsym.info.typeParams` appears unnecessary in testing, and `info` seems always available so it's unclear it gives any savings.
1 parent 210c6ed commit 3eb6d92

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/core/TypeApplications.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,9 @@ class TypeApplications(val self: Type) extends AnyVal {
177177
case self: TypeRef =>
178178
val tsym = self.symbol
179179
if (tsym.isClass) tsym.typeParams
180-
else if (!tsym.exists || !isTrivial(self.prefix, tsym)) self.info.typeParams
181180
else tsym.infoOrCompleter match {
182-
case info: LazyType => info.completerTypeParams(tsym)
183-
case info => info.typeParams
181+
case info: LazyType if tsym.exists && isTrivial(self.prefix, tsym) => info.completerTypeParams(tsym)
182+
case _ => self.info.typeParams
184183
}
185184
case self: AppliedType =>
186185
if (self.tycon.typeSymbol.isClass) Nil

0 commit comments

Comments
 (0)