@@ -141,7 +141,8 @@ object Contexts {
141141 def tree : Tree [? ]
142142 def scope : Scope
143143 def typerState : TyperState
144- def gadt : GadtConstraint
144+ def gadt : GadtConstraint = gadtState.gadt
145+ def gadtState : GadtState
145146 def searchHistory : SearchHistory
146147 def source : SourceFile
147148
@@ -410,7 +411,7 @@ object Contexts {
410411 val constrCtx = outersIterator.dropWhile(_.outer.owner == owner).next()
411412 superOrThisCallContext(owner, constrCtx.scope)
412413 .setTyperState(typerState)
413- .setGadt(gadt )
414+ .setGadtState(gadtState )
414415 .fresh
415416 .setScope(this .scope)
416417 }
@@ -541,8 +542,8 @@ object Contexts {
541542 private var _typerState : TyperState = uninitialized
542543 final def typerState : TyperState = _typerState
543544
544- private var _gadt : GadtConstraint = uninitialized
545- final def gadt : GadtConstraint = _gadt
545+ private var _gadtState : GadtState = uninitialized
546+ final def gadtState : GadtState = _gadtState
546547
547548 private var _searchHistory : SearchHistory = uninitialized
548549 final def searchHistory : SearchHistory = _searchHistory
@@ -567,7 +568,7 @@ object Contexts {
567568 _owner = origin.owner
568569 _tree = origin.tree
569570 _scope = origin.scope
570- _gadt = origin.gadt
571+ _gadtState = origin.gadtState
571572 _searchHistory = origin.searchHistory
572573 _source = origin.source
573574 _moreProperties = origin.moreProperties
@@ -624,12 +625,12 @@ object Contexts {
624625 this ._scope = typer.scope
625626 setTypeAssigner(typer)
626627
627- def setGadt ( gadt : GadtConstraint ): this .type =
628- util.Stats .record(" Context.setGadt " )
629- this ._gadt = gadt
628+ def setGadtState ( gadtState : GadtState ): this .type =
629+ util.Stats .record(" Context.setGadtState " )
630+ this ._gadtState = gadtState
630631 this
631632 def setFreshGADTBounds : this .type =
632- setGadt(gadt .fresh)
633+ setGadtState(gadtState .fresh)
633634
634635 def setSearchHistory (searchHistory : SearchHistory ): this .type =
635636 util.Stats .record(" Context.setSearchHistory" )
@@ -721,7 +722,7 @@ object Contexts {
721722 .updated(notNullInfosLoc, Nil )
722723 .updated(compilationUnitLoc, NoCompilationUnit )
723724 c._searchHistory = new SearchRoot
724- c._gadt = GadtConstraint .empty
725+ c._gadtState = GadtState ( GadtConstraint .empty)
725726 c
726727 end FreshContext
727728
0 commit comments