Skip to content

Commit 1dcf62d

Browse files
Merge pull request #6581 from dotty-staging/fix-pos
Fix missing position assertion failure
2 parents 9413cc0 + e416bb6 commit 1dcf62d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class InterceptedMethods extends MiniPhase {
8282
val Any_!= = defn.Any_!=
8383
val rewritten: Tree = tree.fun.symbol match {
8484
case Any_!= =>
85-
qual.select(defn.Any_==).appliedToArgs(tree.args).select(defn.Boolean_!)
85+
qual.select(defn.Any_==).appliedToArgs(tree.args).select(defn.Boolean_!).withSpan(tree.span)
8686
/*
8787
/* else if (isPrimitiveValueClass(qual.tpe.typeSymbol)) {
8888
// todo: this is needed to support value classes
@@ -100,7 +100,7 @@ class InterceptedMethods extends MiniPhase {
100100
// we get a primitive form of _getClass trying to target a boxed value
101101
// so we need replace that method name with Object_getClass to get correct behavior.
102102
// See SI-5568.
103-
qual.selectWithSig(defn.Any_getClass).appliedToNone
103+
qual.selectWithSig(defn.Any_getClass).appliedToNone.withSpan(tree.span)
104104
case _ =>
105105
tree
106106
}

0 commit comments

Comments
 (0)