@@ -147,14 +147,14 @@ object Matcher {
147
147
def termMatch (scrutineeTerm : Term , patternTerm : Term , hasTypeSplices : Boolean ): Option [Tuple ] = {
148
148
given Env = Map .empty
149
149
if (hasTypeSplices) {
150
- val ctx : Context = internal.Context_GADT_setFreshGADTBounds (rootContext)
150
+ val ctx : Context = internal.Constraints_init (rootContext)
151
151
given Context = ctx
152
152
val matchings = scrutineeTerm =?= patternTerm
153
153
// After matching and doing all subtype checks, we have to approximate all the type bindings
154
154
// that we have found and seal them in a quoted.Type
155
155
matchings.asOptionOfTuple.map { tup =>
156
156
Tuple .fromArray(tup.toArray.map { // TODO improve performance
157
- case x : SymBinding => internal.Context_GADT_approximation (summon[Context ])(x.sym, ! x.fromAbove).seal
157
+ case x : SymBinding => internal.Constraints_approximation (summon[Context ])(x.sym, ! x.fromAbove).seal
158
158
case x => x
159
159
})
160
160
}
@@ -168,14 +168,14 @@ object Matcher {
168
168
def typeTreeMatch (scrutineeTypeTree : TypeTree , patternTypeTree : TypeTree , hasTypeSplices : Boolean ): Option [Tuple ] = {
169
169
given Env = Map .empty
170
170
if (hasTypeSplices) {
171
- val ctx : Context = internal.Context_GADT_setFreshGADTBounds (rootContext)
171
+ val ctx : Context = internal.Constraints_init (rootContext)
172
172
given Context = ctx
173
173
val matchings = scrutineeTypeTree =?= patternTypeTree
174
174
// After matching and doing all subtype checks, we have to approximate all the type bindings
175
175
// that we have found and seal them in a quoted.Type
176
176
matchings.asOptionOfTuple.map { tup =>
177
177
Tuple .fromArray(tup.toArray.map { // TODO improve performance
178
- case x : SymBinding => internal.Context_GADT_approximation (summon[Context ])(x.sym, ! x.fromAbove).seal
178
+ case x : SymBinding => internal.Constraints_approximation (summon[Context ])(x.sym, ! x.fromAbove).seal
179
179
case x => x
180
180
})
181
181
}
@@ -323,7 +323,7 @@ object Matcher {
323
323
fn1 =?= fn2 &&& args1 =?= args2
324
324
325
325
case (Block (stats1, expr1), Block (binding :: stats2, expr2)) if isTypeBinding(binding) =>
326
- qctx.tasty.internal.Context_GADT_addToConstraint (summon[Context ])(binding.symbol :: Nil )
326
+ qctx.tasty.internal.Constraints_add (summon[Context ])(binding.symbol :: Nil )
327
327
matched(new SymBinding (binding.symbol, hasFromAboveAnnotation(binding.symbol))) &&& Block (stats1, expr1) =?= Block (stats2, expr2)
328
328
329
329
/* Match block */
@@ -340,7 +340,7 @@ object Matcher {
340
340
341
341
case (scrutinee, Block (typeBindings, expr2)) if typeBindings.forall(isTypeBinding) =>
342
342
val bindingSymbols = typeBindings.map(_.symbol)
343
- qctx.tasty.internal.Context_GADT_addToConstraint (summon[Context ])(bindingSymbols)
343
+ qctx.tasty.internal.Constraints_add (summon[Context ])(bindingSymbols)
344
344
bindingSymbols.foldRight(scrutinee =?= expr2)((x, acc) => matched(new SymBinding (x, hasFromAboveAnnotation(x))) &&& acc)
345
345
346
346
/* Match if */
0 commit comments