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 {
4444
4545 override def phaseName : String = InterceptedMethods .name
4646
47- private [this ] var primitiveGetClassMethods : Set [Symbol ] = _
47+ private [this ] var scalaValueClasses : scala.collection. Set [Symbol ] = _
4848
4949 /** perform context-dependant initialization */
5050 override def prepareForUnit (tree : Tree )(implicit ctx : Context ) = {
51- primitiveGetClassMethods = Set [ Symbol ]() ++ defn.ScalaValueClasses ().map(x => x.requiredMethod(nme.getClass_) )
51+ scalaValueClasses = defn.ScalaValueClasses ()
5252 ctx
5353 }
5454
@@ -105,7 +105,7 @@ class InterceptedMethods extends MiniPhase {
105105 List(qual, typer.resolveClassTag(tree.pos, qual.tpe.widen))))
106106 }*/
107107 */
108- case t if primitiveGetClassMethods. contains(t) =>
108+ case t if t.name == nme.getClass_ && scalaValueClasses. contains(t.owner ) =>
109109 // if we got here then we're trying to send a primitive getClass method to either
110110 // a) an Any, in which cage Object_getClass works because Any erases to object. Or
111111 //
You can’t perform that action at this time.
0 commit comments