diff options
author | Martin Odersky <odersky@gmail.com> | 2014-09-04 08:35:42 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-09-04 08:41:01 +0200 |
commit | 225102627d37f16134bc682eb5b01270684a02e4 (patch) | |
tree | 6a57d22adc7c8231b7fbfcc22832ab68a698cb95 /src/dotty/tools/dotc/core/Contexts.scala | |
parent | 2558c49984611935fff91b0b062f6af5a61e71ce (diff) | |
download | dotty-225102627d37f16134bc682eb5b01270684a02e4.tar.gz dotty-225102627d37f16134bc682eb5b01270684a02e4.tar.bz2 dotty-225102627d37f16134bc682eb5b01270684a02e4.zip |
Add inSuperCall mode and flag.
Needed to keep a record of definitions in supercall arguments. These
may not see the enclosing class.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index b221d4083..6b9b1dec7 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -267,6 +267,7 @@ object Contexts { * - as owner: The primary constructor of the class * - as outer context: The context enclosing the class context * - as scope: The parameter accessors in the class context + * - with additional mode: InSuperCall * * The reasons for this peculiar choice of attributes are as follows: * @@ -303,7 +304,7 @@ object Contexts { /** The super= or this-call context with given owner and locals. */ private def superOrThisCallContext(owner: Symbol, locals: Scope): FreshContext = { assert(isClassDefContext) - outer.fresh.setOwner(owner).setScope(locals) + outer.fresh.setOwner(owner).setScope(locals).setMode(ctx.mode | Mode.InSuperCall) } /** The current source file; will be derived from current |