Skip to content

Commit 5535e13

Browse files
Inline Function1#andThen in the interest of performance
1 parent c4e703f commit 5535e13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/ast/TreeTypeMap.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ class TreeTypeMap(
6868
}
6969
}
7070

71-
val mapType: Type => Type =
71+
def mapType(tp: Type): Type =
7272
val substMap = new TypeMap():
7373
def apply(tp: Type): Type = tp match
7474
case tp: TermRef if tp.symbol.isImport => mapOver(tp)
7575
case tp => tp.substSym(substFrom, substTo)
76-
typeMap.andThen(substMap).andThen(mapOwnerThis)
76+
mapOwnerThis(substMap(typeMap(tp)))
7777
end mapType
7878

7979
private def updateDecls(prevStats: List[Tree], newStats: List[Tree]): Unit =

0 commit comments

Comments
 (0)