aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-03-14 10:02:16 +0100
committerMartin Odersky <odersky@gmail.com>2016-03-14 10:02:16 +0100
commit6c18e37886e90d217579112ccf867c22658273be (patch)
tree3e5bed6a8bee401d38c80d2b4fbdbfdd6cec039f /src/dotty/tools/dotc/typer/Typer.scala
parent13e3d59937ddcb9819904593cb7c6417af8eedd2 (diff)
downloaddotty-6c18e37886e90d217579112ccf867c22658273be.tar.gz
dotty-6c18e37886e90d217579112ccf867c22658273be.tar.bz2
dotty-6c18e37886e90d217579112ccf867c22658273be.zip
Address reviewer comments.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 1a0525c6d..2069e790b 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -998,7 +998,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(ctx.compilationUnit.source, Position(toUntyped(vdef).envelope.start), "@volatile ")
+ patch(Position(toUntyped(vdef).envelope.start), "@volatile ")
}
def typedDefDef(ddef: untpd.DefDef, sym: Symbol)(implicit ctx: Context) = track("typedDefDef") {
@@ -1158,8 +1158,8 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if (ctx.scala2Mode) {
// Under -rewrite, patch `x _` to `(() => x)`
ctx.migrationWarning(msg, tree.pos)
- patch(ctx.compilationUnit.source, Position(tree.pos.start), "(() => ")
- patch(ctx.compilationUnit.source, Position(qual.pos.end, tree.pos.end), ")")
+ patch(Position(tree.pos.start), "(() => ")
+ patch(Position(qual.pos.end, tree.pos.end), ")")
res = typed(untpd.Function(Nil, untpd.TypedSplice(res)))
}
else ctx.error(msg, tree.pos)