Skip to content

Commit 4312f86

Browse files
committed
Remove casting
1 parent 2c4b58c commit 4312f86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,11 +1401,9 @@ trait Applications extends Compatibility {
14011401
// TODO: Maybe the 'reorder' method above can be reused, or be template
14021402
if (bunchedArgs != Nil && remainingArgTypes != Nil) {
14031403

1404-
val resTypeOfUnapplyFn = unapplyFn.tpe.widen.asInstanceOf[MethodType].resType
1405-
14061404
val names: SingleDenotation =
1407-
resTypeOfUnapplyFn.member(nme.get).info
1408-
.orElse(resTypeOfUnapplyFn)
1405+
mt.resType.member(nme.get).info
1406+
.orElse(mt.resType)
14091407
.member(tpnme.Names)
14101408
.accessibleFrom(selType)
14111409
// TODO: Is it possible to get something else than a SingleDenotation?

0 commit comments

Comments
 (0)