File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ class InterceptedMethods extends MiniPhase {
44
44
45
45
override def phaseName : String = InterceptedMethods .name
46
46
47
- private [this ] var primitiveGetClassMethods : Set [Symbol ] = _
47
+ private [this ] var scalaValueClasses : scala.collection. Set [Symbol ] = _
48
48
49
49
/** perform context-dependant initialization */
50
50
override def prepareForUnit (tree : Tree )(implicit ctx : Context ) = {
51
- primitiveGetClassMethods = Set [ Symbol ]() ++ defn.ScalaValueClasses ().map(x => x.requiredMethod(nme.getClass_) )
51
+ scalaValueClasses = defn.ScalaValueClasses ()
52
52
ctx
53
53
}
54
54
@@ -105,7 +105,7 @@ class InterceptedMethods extends MiniPhase {
105
105
List(qual, typer.resolveClassTag(tree.pos, qual.tpe.widen))))
106
106
}*/
107
107
*/
108
- case t if primitiveGetClassMethods. contains(t) =>
108
+ case t if t.name == nme.getClass_ && scalaValueClasses. contains(t.owner ) =>
109
109
// if we got here then we're trying to send a primitive getClass method to either
110
110
// a) an Any, in which cage Object_getClass works because Any erases to object. Or
111
111
//
You can’t perform that action at this time.
0 commit comments