Skip to content

Commit 40cc430

Browse files
committed
Remove unused code meant to support arrays of value classes
Efficient arrays of value classes have been abandoned for now, see #1558
1 parent 868d199 commit 40cc430

File tree

2 files changed

+2
-503
lines changed

2 files changed

+2
-503
lines changed

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

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,12 @@ class ExtensionMethods extends MiniPhase with DenotTransformer with FullParamete
8686
val evt2uSym = ctx.newSymbol(moduleSym, nme.EVT2U, Synthetic | Method,
8787
MethodType(List(nme.x_0), List(evt), underlying))
8888

89-
val defn = ctx.definitions
90-
91-
val underlyingCls = underlying.classSymbol
92-
val underlyingClsName =
93-
if (underlyingCls.isNumericValueClass || underlyingCls == defn.BooleanClass) underlyingCls.name
94-
else nme.Object
95-
96-
val syp = ctx.requiredClass(s"dotty.runtime.vc.VC${underlyingClsName}Companion").asClass
97-
98-
newSuperClass = tpd.ref(syp).select(nme.CONSTRUCTOR).appliedToType(valueClass.typeRef).tpe.resultType
99-
10089
decls1.enter(u2evtSym)
10190
decls1.enter(evt2uSym)
10291
}
10392

104-
// Add the extension methods, the cast methods u2evt$ and evt2u$, and a VC*Companion superclass
105-
moduleClassSym.copySymDenotation(info =
106-
cinfo.derivedClassInfo(
107-
// FIXME: use of VC*Companion superclasses is disabled until the conflicts with SyntheticMethods are solved.
108-
//classParents = List(newSuperClass)
109-
decls = decls1))
93+
// Add the extension methods and the cast methods u2evt$ and evt2u$
94+
moduleClassSym.copySymDenotation(info = cinfo.derivedClassInfo(decls = decls1))
11095
case _ =>
11196
moduleClassSym
11297
}

0 commit comments

Comments
 (0)