Skip to content

Commit

Permalink
Update TastyFormat for flexible types
Browse files Browse the repository at this point in the history
  • Loading branch information
noti0na1 committed Apr 8, 2024
1 parent 1b28f83 commit e8b4021
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tasty/src/dotty/tools/tasty/TastyFormat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ Standard-Section: "ASTs" TopLevelStat*
ORtype Length left_Type right_Type -- lefgt | right
MATCHtype Length bound_Type sel_Type case_Type* -- sel match {cases} with optional upper `bound`
MATCHCASEtype Length pat_type rhs_Type -- match cases are MATCHCASEtypes or TYPELAMBDAtypes over MATCHCASEtypes
FLEXIBLEtype Length underlying_Type -- (underlying)?
BIND Length boundName_NameRef bounds_Type Modifier* -- boundName @ bounds, for type-variables defined in a type pattern
BYNAMEtype underlying_Type -- => underlying
PARAMtype Length binder_ASTRef paramNum_Nat -- A reference to parameter # paramNum in lambda type `binder`
Expand Down Expand Up @@ -649,7 +650,7 @@ object TastyFormat {
firstNatTreeTag <= tag && tag <= RENAMED ||
firstASTTreeTag <= tag && tag <= BOUNDED ||
firstNatASTTreeTag <= tag && tag <= NAMEDARG ||
firstLengthTreeTag <= tag && tag <= MATCHCASEtype ||
firstLengthTreeTag <= tag && tag <= FLEXIBLEtype ||
tag == HOLE

def isParamTag(tag: Int): Boolean = tag == PARAM || tag == TYPEPARAM
Expand Down Expand Up @@ -851,6 +852,7 @@ object TastyFormat {
case MATCHCASEtype => "MATCHCASEtype"
case MATCHtpt => "MATCHtpt"
case PARAMtype => "PARAMtype"
case FLEXIBLEtype => "FLEXIBLEtype"
case ANNOTATION => "ANNOTATION"
case PRIVATEqualified => "PRIVATEqualified"
case PROTECTEDqualified => "PROTECTEDqualified"
Expand Down

0 comments on commit e8b4021

Please sign in to comment.