Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _scala3-reference/changed-features/compiler-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ package dividezero

import dotty.tools.dotc.ast.Trees.*
import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.report
import dotty.tools.dotc.core.Constants.Constant
import dotty.tools.dotc.core.Contexts.Context
import dotty.tools.dotc.core.Decorators.*
Expand Down Expand Up @@ -84,7 +85,7 @@ class DivideZeroPhase extends PluginPhase:
tree match
case Apply(Select(rcvr, nme.DIV), List(Literal(Constant(0))))
if rcvr.tpe <:< defn.IntType =>
report.error("dividing by zero", tree.pos)
report.error("dividing by zero", tree.srcPos)
case _ =>
()
tree
Expand Down