File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,8 @@ class PreSpecializer extends MiniPhaseTransform {
82
82
83
83
def allowedToSpecialize (sym : Symbol ): Boolean = {
84
84
sym.name != nme.asInstanceOf_ &&
85
- sym.name != nme.isInstanceOf_ &&
86
85
! (sym is Flags .JavaDefined ) &&
87
- ! sym.isConstructor
86
+ ! sym.isPrimaryConstructor
88
87
}
89
88
90
89
if (allowedToSpecialize(sym)) {
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ class TypeSpecializer extends MiniPhaseTransform with InfoTransformer {
64
64
def allowedToSpecialize (sym : Symbol , numOfTypes : Int )(implicit ctx : Context ) =
65
65
numOfTypes > 0 &&
66
66
sym.name != nme.asInstanceOf_ &&
67
- sym.name != nme.isInstanceOf_ &&
68
67
! newSymbolMap.contains(sym) &&
68
+ ! sym.name.toString.contains(" $sp" ) &&
69
69
! (sym is Flags .JavaDefined ) &&
70
- ! sym.isConstructor
70
+ ! sym.isPrimaryConstructor
71
71
72
72
73
73
def getSpecTypes (method : Symbol , poly : PolyType )(implicit ctx : Context ): List [(Int , List [Type ])] = {
@@ -189,9 +189,10 @@ class TypeSpecializer extends MiniPhaseTransform with InfoTransformer {
189
189
190
190
tree.tpe.widen match {
191
191
192
- case poly : PolyType if ! (tree.symbol.isConstructor
193
- || (tree.symbol is Flags .Label ))
194
- || (tree.symbol.name == nme.asInstanceOf_) =>
192
+ case poly : PolyType
193
+ if ! (tree.symbol.isPrimaryConstructor
194
+ || (tree.symbol is Flags .Label )
195
+ ) =>
195
196
val origTParams = tree.tparams.map(_.symbol)
196
197
val origVParams = tree.vparamss.flatten.map(_.symbol)
197
198
You can’t perform that action at this time.
0 commit comments