Skip to content

Commit 63e55a1

Browse files
committed
CheckStatic: report error position in case of disallowed override
1 parent 953fcef commit 63e55a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/transform/CheckStatic.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class CheckStatic extends MiniPhaseTransform { thisTransformer =>
6969
} else if (defn.symbol.is(Flags.Lazy)) {
7070
ctx.error("Lazy @static fields are not supported", defn.pos)
7171
} else if (defn.symbol.allOverriddenSymbols.nonEmpty) {
72-
ctx.error("@static members cannot override or implement non-static ones")
72+
ctx.error("@static members cannot override or implement non-static ones", defn.pos)
7373
}
7474
} else hadNonStaticField = hadNonStaticField || defn.isInstanceOf[ValDef]
7575

0 commit comments

Comments
 (0)