Skip to content

Commit 1124199

Browse files
committed
Add back isSpecializableTuple exclusion
... and leave a comment now that I understand it.
1 parent 02ff089 commit 1124199

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,7 @@ class Definitions {
16351635
case List(x) => Tuple1SpecializedParamClasses().contains(x.classSymbol)
16361636
case List(x, y) => Tuple2SpecializedParamClasses().contains(x.classSymbol) && Tuple2SpecializedParamClasses().contains(y.classSymbol)
16371637
case _ => false
1638+
&& base.owner.denot.info.member(base.name.specializedName(args)).exists // when dotc compiles the stdlib there are no specialised classes
16381639

16391640
def isSpecializableFunction(cls: ClassSymbol, paramTypes: List[Type], retType: Type)(using Context): Boolean =
16401641
paramTypes.length <= 2

0 commit comments

Comments
 (0)