Skip to content

Commit 3ba4b07

Browse files
committed
Fix owner check
1 parent e7a969f commit 3ba4b07

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ class Definitions {
814814
def TupleXXL_fromIterator(implicit ctx: Context): Symbol = TupleXXLModule.requiredMethod("fromIterator")
815815

816816
lazy val DynamicTupleModule: Symbol = ctx.requiredModule("scala.runtime.DynamicTuple")
817+
lazy val DynamicTupleModuleClass: Symbol = DynamicTupleModule.moduleClass
817818
lazy val DynamicTuple_consIterator: Symbol = DynamicTupleModule.requiredMethod("consIterator")
818819
lazy val DynamicTuple_concatIterator: Symbol = DynamicTupleModule.requiredMethod("concatIterator")
819820
lazy val DynamicTuple_dynamicApply: Symbol = DynamicTupleModule.requiredMethod("dynamicApply")

compiler/src/dotty/tools/dotc/transform/TupleOptimizations.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TupleOptimizations extends MiniPhase with IdentityDenotTransformer {
2424
def phaseName: String = "genericTuples"
2525

2626
override def transformApply(tree: tpd.Apply)(implicit ctx: Context): tpd.Tree = {
27-
if (!tree.symbol.exists || tree.symbol.owner != defn.DynamicTupleModule) super.transformApply(tree)
27+
if (!tree.symbol.exists || tree.symbol.owner != defn.DynamicTupleModuleClass) super.transformApply(tree)
2828
else if (tree.symbol == defn.DynamicTuple_dynamicCons) transformTupleCons(tree)
2929
else if (tree.symbol == defn.DynamicTuple_dynamicTail) transformTupleTail(tree)
3030
else if (tree.symbol == defn.DynamicTuple_dynamicSize) transformTupleSize(tree)

0 commit comments

Comments
 (0)