Skip to content

Commit

Permalink
Fix SpecializeTuples
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Feb 1, 2024
1 parent 4526665 commit d7ad0c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SpecializeTuples extends MiniPhase:
override def transformSelect(tree: Select)(using Context): Tree = tree match
case Select(qual, name @ (nme._1 | nme._2)) =>
qual.tpe.widenDealias match
case AppliedType(tycon, args) if defn.isSpecializableTuple(tycon.classSymbol, args) =>
case AppliedType(tycon, args) if defn.isSpecializableTuple(tycon.typeSymbol, args) =>
val argIdx = if name == nme._1 then 0 else 1
Select(qual, name.specializedName(args(argIdx) :: Nil))
case _ =>
Expand Down

0 comments on commit d7ad0c6

Please sign in to comment.