File tree 1 file changed +5
-0
lines changed
src/dotty/tools/dotc/transform 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ class InterceptedMethods extends MiniPhaseTransform {
100
100
lazy val Select (qual, _) = tree.fun
101
101
val Any_## = this .Any_##
102
102
val Any_!= = defn.Any_!=
103
+ val Any_null_== = defn.Any_null_==
103
104
val rewrite : Tree = tree.fun.symbol match {
104
105
case Any_## =>
105
106
poundPoundValue(qual)
@@ -113,6 +114,8 @@ class InterceptedMethods extends MiniPhaseTransform {
113
114
List(qual, typer.resolveClassTag(tree.pos, qual.tpe.widen))))
114
115
}*/
115
116
*/
117
+ case Any_null_== =>
118
+ qual.select(defn.Any_== ).appliedToArgs(tree.args)
116
119
case t if primitiveGetClassMethods.contains(t) =>
117
120
// if we got here then we're trying to send a primitive getClass method to either
118
121
// a) an Any, in which cage Object_getClass works because Any erases to object. Or
@@ -123,6 +126,8 @@ class InterceptedMethods extends MiniPhaseTransform {
123
126
// so we need replace that method name with Object_getClass to get correct behavior.
124
127
// See SI-5568.
125
128
qual.selectWithSig(defn.Any_getClass ).appliedToNone
129
+ case t if t.name == nme.EQ && t.owner == defn.NullClass =>
130
+ qual.select(defn.Any_== ).appliedToArgs(tree.args)
126
131
case _ =>
127
132
tree
128
133
}
You can’t perform that action at this time.
0 commit comments