From 99d4d45e3c58c988849a1439a83e8f69a155a295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Chantepie?= Date: Thu, 21 Apr 2022 21:25:45 +0200 Subject: [PATCH] Fix StandardPlugin example --- _scala3-reference/changed-features/compiler-plugins.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_scala3-reference/changed-features/compiler-plugins.md b/_scala3-reference/changed-features/compiler-plugins.md index c77796d71d..39358b4e8c 100644 --- a/_scala3-reference/changed-features/compiler-plugins.md +++ b/_scala3-reference/changed-features/compiler-plugins.md @@ -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.* @@ -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