aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 82eda0d0a..af09a8283 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -1149,7 +1149,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if (sym.is(Lazy, butNot = Deferred | Module | Synthetic) && !sym.isVolatile &&
ctx.scala2Mode && ctx.settings.rewrite.value.isDefined &&
!ctx.isAfterTyper)
- patch(Position(toUntyped(vdef).envelope.start), "@volatile ")
+ patch(Position(toUntyped(vdef).pos.start), "@volatile ")
}
def typedDefDef(ddef: untpd.DefDef, sym: Symbol)(implicit ctx: Context) = track("typedDefDef") {
@@ -1342,7 +1342,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
val annot1 = typedExpr(tree.annot, defn.AnnotationType)
val arg1 = typed(tree.arg, pt)
if (ctx.mode is Mode.Type)
- assignType(cpy.Annotated(tree)(annot1, arg1), annot1, arg1)
+ assignType(cpy.Annotated(tree)(arg1, annot1), arg1, annot1)
else {
val tpt = TypeTree(AnnotatedType(arg1.tpe.widen, Annotation(annot1)))
assignType(cpy.Typed(tree)(arg1, tpt), tpt)