diff options
author | odersky <odersky@gmail.com> | 2016-04-16 13:42:41 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2016-04-16 13:42:41 +0200 |
commit | 3ef41153463fbc89a3dda3a648ae0320aef95555 (patch) | |
tree | e2ac430f5f0b498fc7b8243c5cda2df6044097cf /src/dotty/tools/dotc/core/Contexts.scala | |
parent | 8af61ab2df46456fb943ce614c4d22b22a297239 (diff) | |
parent | 7ea24c63ad57029b8e68ff00f5978e0e9058f60b (diff) | |
download | dotty-3ef41153463fbc89a3dda3a648ae0320aef95555.tar.gz dotty-3ef41153463fbc89a3dda3a648ae0320aef95555.tar.bz2 dotty-3ef41153463fbc89a3dda3a648ae0320aef95555.zip |
Merge pull request #1211 from dotty-staging/fix-#1202
Fix Tasty errors
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index ad3a0057d..bbe8e920c 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -336,13 +336,17 @@ object Contexts { def thisCallArgContext: Context = { assert(owner.isClassConstructor) val constrCtx = outersIterator.dropWhile(_.outer.owner == owner).next - superOrThisCallContext(owner, constrCtx.scope).setTyperState(typerState) + superOrThisCallContext(owner, constrCtx.scope) + .setTyperState(typerState) + .setGadt(gadt) } - /** The super= or this-call context with given owner and locals. */ + /** The super- or this-call context with given owner and locals. */ private def superOrThisCallContext(owner: Symbol, locals: Scope): FreshContext = { var classCtx = outersIterator.dropWhile(!_.isClassDefContext).next - classCtx.outer.fresh.setOwner(owner).setScope(locals).setMode(classCtx.mode | Mode.InSuperCall) + classCtx.outer.fresh.setOwner(owner) + .setScope(locals) + .setMode(classCtx.mode | Mode.InSuperCall) } /** The context of expression `expr` seen as a member of a statement sequence */ @@ -438,6 +442,7 @@ object Contexts { def setImportInfo(importInfo: ImportInfo): this.type = { this.importInfo = importInfo; this } def setRunInfo(runInfo: RunInfo): this.type = { this.runInfo = runInfo; this } def setDiagnostics(diagnostics: Option[StringBuilder]): this.type = { this.diagnostics = diagnostics; this } + def setGadt(gadt: GADTMap): this.type = { this.gadt = gadt; this } def setTypeComparerFn(tcfn: Context => TypeComparer): this.type = { this.typeComparer = tcfn(this); this } def setSearchHistory(searchHistory: SearchHistory): this.type = { this.searchHistory = searchHistory; this } def setFreshNames(freshNames: FreshNameCreator): this.type = { this.freshNames = freshNames; this } |