diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-24 17:32:27 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-24 17:50:52 +0200 |
commit | bdefca99bc8a7ef6c1d895aecad66b81a18fa9e7 (patch) | |
tree | 49e519fb8a9bc45959f00e558e82a9655d0063b7 /src/dotty/tools/dotc/typer/Namer.scala | |
parent | 412fc2ce472acf8b59dba05ee96d3c09a6bb2d41 (diff) | |
download | dotty-bdefca99bc8a7ef6c1d895aecad66b81a18fa9e7.tar.gz dotty-bdefca99bc8a7ef6c1d895aecad66b81a18fa9e7.tar.bz2 dotty-bdefca99bc8a7ef6c1d895aecad66b81a18fa9e7.zip |
Fix context for super calls
Super calls need to have special contexts, going beyond super-mode.
It's explained in detail in Context#superCallContext.
this(...) calls also need special contexts, but this is not enabled yet
(some tests fail, need to track down why).
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Namer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 20a5a1204..782faf0d4 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -462,7 +462,7 @@ class Namer { typer: Typer => } def checkedParentType(parent: untpd.Tree): Type = { - val ptype = parentType(parent)(ctx.fresh addMode Mode.InSuperCall) + val ptype = parentType(parent)(ctx.superCallContext) if (cls.isRefinementClass) ptype else checkClassTypeWithStablePrefix(ptype, parent.pos, traitReq = parent ne parents.head) } |