Skip to content

Commit 061b272

Browse files
authored
Backport "Improve performance of FunctionOf.unapply" to LTS (#19133)
Backports #18291 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents b3886c3 + f93adb5 commit 061b272

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,10 +1110,10 @@ class Definitions {
11101110
ft.dealias match
11111111
case ErasedFunctionOf(mt) =>
11121112
Some(mt.paramInfos, mt.resType, mt.isContextualMethod)
1113-
case _ =>
1114-
val tsym = ft.dealias.typeSymbol
1113+
case dft =>
1114+
val tsym = dft.typeSymbol
11151115
if isFunctionSymbol(tsym) && ft.isRef(tsym) then
1116-
val targs = ft.dealias.argInfos
1116+
val targs = dft.argInfos
11171117
if (targs.isEmpty) None
11181118
else Some(targs.init, targs.last, tsym.name.isContextFunction)
11191119
else None

0 commit comments

Comments
 (0)