Skip to content

Commit 49e9d67

Browse files
committed
Avoid crashing when compiling stdLib213
package scala does not have a member class Tuple2$mcCI$sp while compiling /__w/dotty/dotty/community-build/community-projects/stdLib213/src/library/scala/AnyValCompanion.scala, ... [error] dotty.tools.dotc.core.TypeError: package scala does not have a member class Tuple2$mcCI$sp [error] at dotty.tools.dotc.core.Denotations$Denotation.requiredSymbol(Denotations.scala:305) [error] at dotty.tools.dotc.core.Denotations$Denotation.requiredClass(Denotations.scala:340) [error] at dotty.tools.dotc.core.Definitions.SpecialisedTuple(Definitions.scala:1335) [error] at dotty.tools.dotc.transform.SpecializeTuples.transformApply(SpecializeTuples.scala:27)
1 parent e6042a5 commit 49e9d67

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
@@ -1634,6 +1634,7 @@ class Definitions {
16341634
case List(x) => Tuple1SpecializedParamClasses().contains(x.typeSymbol)
16351635
case List(x, y) => Tuple2SpecializedParamClasses().contains(x.typeSymbol) && Tuple2SpecializedParamClasses().contains(y.typeSymbol)
16361636
case _ => false
1637+
&& base.owner.denot.info.member(base.name.specializedName(args)).disambiguate(_.isClass).exists
16371638

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

0 commit comments

Comments
 (0)