@@ -141,7 +141,8 @@ object Contexts {
141
141
def tree : Tree [? ]
142
142
def scope : Scope
143
143
def typerState : TyperState
144
- def gadt : GadtConstraint
144
+ def gadt : GadtConstraint = gadtState.gadt
145
+ def gadtState : GadtState
145
146
def searchHistory : SearchHistory
146
147
def source : SourceFile
147
148
@@ -410,7 +411,7 @@ object Contexts {
410
411
val constrCtx = outersIterator.dropWhile(_.outer.owner == owner).next()
411
412
superOrThisCallContext(owner, constrCtx.scope)
412
413
.setTyperState(typerState)
413
- .setGadt(gadt )
414
+ .setGadtState(gadtState )
414
415
.fresh
415
416
.setScope(this .scope)
416
417
}
@@ -541,8 +542,8 @@ object Contexts {
541
542
private var _typerState : TyperState = uninitialized
542
543
final def typerState : TyperState = _typerState
543
544
544
- private var _gadt : GadtConstraint = uninitialized
545
- final def gadt : GadtConstraint = _gadt
545
+ private var _gadtState : GadtState = uninitialized
546
+ final def gadtState : GadtState = _gadtState
546
547
547
548
private var _searchHistory : SearchHistory = uninitialized
548
549
final def searchHistory : SearchHistory = _searchHistory
@@ -567,7 +568,7 @@ object Contexts {
567
568
_owner = origin.owner
568
569
_tree = origin.tree
569
570
_scope = origin.scope
570
- _gadt = origin.gadt
571
+ _gadtState = origin.gadtState
571
572
_searchHistory = origin.searchHistory
572
573
_source = origin.source
573
574
_moreProperties = origin.moreProperties
@@ -624,12 +625,12 @@ object Contexts {
624
625
this ._scope = typer.scope
625
626
setTypeAssigner(typer)
626
627
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
630
631
this
631
632
def setFreshGADTBounds : this .type =
632
- setGadt(gadt .fresh)
633
+ setGadtState(gadtState .fresh)
633
634
634
635
def setSearchHistory (searchHistory : SearchHistory ): this .type =
635
636
util.Stats .record(" Context.setSearchHistory" )
@@ -721,7 +722,7 @@ object Contexts {
721
722
.updated(notNullInfosLoc, Nil )
722
723
.updated(compilationUnitLoc, NoCompilationUnit )
723
724
c._searchHistory = new SearchRoot
724
- c._gadt = GadtConstraint .empty
725
+ c._gadtState = GadtState ( GadtConstraint .empty)
725
726
c
726
727
end FreshContext
727
728
0 commit comments