File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed
compiler/src/dotty/tools/dotc/ast
stdlib-bootstrapped-tasty-tests/src Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -637,10 +637,7 @@ object desugar {
637
637
// new C[...](p1, ..., pN)(moreParams)
638
638
val (caseClassMeths, enumScaffolding) = {
639
639
def syntheticProperty (name : TermName , tpt : Tree , rhs : Tree ) =
640
- val mods =
641
- if ctx.settings.Yscala2Stdlib .value then synthetic | Inline
642
- else synthetic
643
- DefDef (name, Nil , tpt, rhs).withMods(mods)
640
+ DefDef (name, Nil , tpt, rhs).withMods(synthetic)
644
641
645
642
def productElemMeths =
646
643
val caseParams = derivedVparamss.head.toArray
Original file line number Diff line number Diff line change @@ -155,6 +155,12 @@ object MiMaFilters {
155
155
// Companion module class: Missing type java.io.Serializable
156
156
ProblemFilters .exclude[MissingTypesProblem ](" scala.*$" ),
157
157
158
+ // Case class product accessors
159
+ ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*._1" ),
160
+ ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*._2" ),
161
+ ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*._3" ),
162
+ ProblemFilters .exclude[DirectMissingMethodProblem ](" scala.*._4" ),
163
+
158
164
// abstract method elemTag()scala.reflect.ClassTag in class scala.collection.mutable.ArraySeq does not have a correspondent in other version
159
165
ProblemFilters .exclude[DirectAbstractMethodProblem ](" scala.collection.immutable.ArraySeq.elemTag" ),
160
166
ProblemFilters .exclude[DirectAbstractMethodProblem ](" scala.collection.mutable.ArraySeq.elemTag" ),
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ object HelloWorld:
15
15
16
16
testScala2UnapplySignatures()
17
17
testScala2ObjectParents()
18
- testScala2ProductMembers()
19
18
}
20
19
21
20
def testScala2UnapplySignatures () = {
@@ -32,11 +31,3 @@ object HelloWorld:
32
31
assert(! typeChecks(" Either: scala.deriving.Mirror.Sum" ))
33
32
assert(! typeChecks(" Either: scala.deriving.Mirror" ))
34
33
}
35
- def testScala2ProductMembers () = {
36
- Some (1 )._1
37
- Right (1 )._1
38
- // (1, 2)._1 // FIXME: Exception java.lang.IncompatibleClassChangeError: class scala.Tuple2$mcII$sp cannot inherit from final class scala.Tuple2
39
- // (1, 2)._2 // FIXME: Exception java.lang.IncompatibleClassChangeError: class scala.Tuple2$mcII$sp cannot inherit from final class scala.Tuple2
40
- :: (1 , Nil )._1
41
- :: (1 , Nil )._2
42
- }
You can’t perform that action at this time.
0 commit comments