Skip to content

Commit 3dc3b19

Browse files
committed
TastyFormat#numRefs: Properly handle implicit/erased method types
I don't have a test case but the previous definition was definitely wrong.
1 parent 052c3b1 commit 3dc3b19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TastyFormat.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,8 @@ object TastyFormat {
649649
case VALDEF | DEFDEF | TYPEDEF | OBJECTDEF | TYPEPARAM | PARAM | NAMEDARG | RETURN | BIND |
650650
SELFDEF | REFINEDtype | TERMREFin | TYPEREFin | HOLE => 1
651651
case RENAMED | PARAMtype => 2
652-
case POLYtype | METHODtype | TYPELAMBDAtype => -1
652+
case POLYtype | METHODtype | IMPLICITMETHODtype | ERASEDMETHODtype | ERASEDIMPLICITMETHODtype |
653+
TYPELAMBDAtype => -1
653654
case _ => 0
654655
}
655656
}

0 commit comments

Comments
 (0)