aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-17 13:27:38 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-21 17:41:14 +0200
commit74490a2315ce8c38fdf6905e713e57005bf085c7 (patch)
treeed70dec976c29990f8583fb7033dca6f32b144d2 /src/dotty/tools/dotc/core
parentff96f13f0fb7f69d6dd747908281373031b9c545 (diff)
downloaddotty-74490a2315ce8c38fdf6905e713e57005bf085c7.tar.gz
dotty-74490a2315ce8c38fdf6905e713e57005bf085c7.tar.bz2
dotty-74490a2315ce8c38fdf6905e713e57005bf085c7.zip
Fix DenotationNotDefinedHere in pattern matcher
This was uncovered by previous commit "Fix isSubType bug ...". Also removed two redundants ".fresh" calls in "fresh.addMode".
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Decorators.scala2
-rw-r--r--src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Decorators.scala b/src/dotty/tools/dotc/core/Decorators.scala
index 8aaef985c..d90b959ab 100644
--- a/src/dotty/tools/dotc/core/Decorators.scala
+++ b/src/dotty/tools/dotc/core/Decorators.scala
@@ -173,7 +173,7 @@ object Decorators {
def treatSingleArg(arg: Any) : Any =
try
arg match {
- case arg: Showable => arg.show(ctx.fresh.addMode(Mode.FutureDefsOK))
+ case arg: Showable => arg.show(ctx.addMode(Mode.FutureDefsOK))
case _ => arg
}
catch {
diff --git a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
index 84d497b9c..e753bdcab 100644
--- a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
+++ b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
@@ -720,7 +720,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) {
case SELECT =>
def readQual(name: Name) = {
val localCtx =
- if (name == nme.CONSTRUCTOR) ctx.fresh.addMode(Mode.InSuperCall) else ctx
+ if (name == nme.CONSTRUCTOR) ctx.addMode(Mode.InSuperCall) else ctx
readTerm()(localCtx)
}
def readRest(name: Name, sig: Signature) = {