Skip to content

Commit 9fd12cf

Browse files
committed
Drop ERASEDIMPLICITMETHODtype in TastyFormat
`erased` parameters cannot be (old style) `implicit` anymore.
1 parent 9097a3a commit 9fd12cf

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,14 @@ object TastyFormat {
432432
final val CONTEXTUALMETHODtype = 182
433433
final val ERASEDCONTEXTUALMETHODtype = 183
434434
final val IMPLICITMETHODtype = 184
435-
final val ERASEDIMPLICITMETHODtype = 185
436435

437436
final val MATCHtype = 190
438437
final val MATCHtpt = 191
439438

440439
def methodType(isContextual: Boolean, isImplicit: Boolean, isErased: Boolean): Int = {
441440
val implicitOffset =
442441
if (isContextual) 2
443-
else if (isImplicit) 4
442+
else if (isImplicit) { assert(!isErased); 4 }
444443
else 0
445444
val erasedOffset = if (isErased) 1 else 0
446445
METHODtype + erasedOffset + implicitOffset
@@ -650,7 +649,6 @@ object TastyFormat {
650649
case CONTEXTUALMETHODtype => "CONTEXTUALMETHODtype"
651650
case ERASEDCONTEXTUALMETHODtype => "ERASEDCONTEXTUALMETHODtype"
652651
case IMPLICITMETHODtype => "IMPLICITMETHODtype"
653-
case ERASEDIMPLICITMETHODtype => "ERASEDIMPLICITMETHODtype"
654652
case TYPELAMBDAtype => "TYPELAMBDAtype"
655653
case LAMBDAtpt => "LAMBDAtpt"
656654
case MATCHtype => "MATCHtype"
@@ -672,7 +670,7 @@ object TastyFormat {
672670
case POLYtype | TYPELAMBDAtype |
673671
METHODtype | ERASEDMETHODtype |
674672
CONTEXTUALMETHODtype | ERASEDCONTEXTUALMETHODtype |
675-
IMPLICITMETHODtype | ERASEDIMPLICITMETHODtype => -1
673+
IMPLICITMETHODtype => -1
676674
case _ => 0
677675
}
678676
}

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ class TastyPrinter(bytes: Array[Byte])(implicit ctx: Context) {
8686
printNat(); printTrees()
8787
case METHODtype | ERASEDMETHODtype |
8888
CONTEXTUALMETHODtype | ERASEDCONTEXTUALMETHODtype |
89-
IMPLICITMETHODtype | ERASEDIMPLICITMETHODtype |
90-
POLYtype | TYPELAMBDAtype =>
89+
IMPLICITMETHODtype | POLYtype | TYPELAMBDAtype =>
9190
printTree()
9291
until(end) { printName(); printTree() }
9392
case PARAMtype =>

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

-2
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ class TreeUnpickler(reader: TastyReader,
357357
readMethodic(ErasedContextualMethodType, _.toTermName)
358358
case IMPLICITMETHODtype =>
359359
readMethodic(ImplicitMethodType, _.toTermName)
360-
case ERASEDIMPLICITMETHODtype =>
361-
readMethodic(ErasedImplicitMethodType, _.toTermName)
362360
case TYPELAMBDAtype =>
363361
readMethodic(HKTypeLambda, _.toTypeName)
364362
case PARAMtype =>

0 commit comments

Comments
 (0)