Moved 'initial' (renamed from 'topLevel') flag to ConstraintContext

This commit is contained in:
Svetlana Isakova
2015-09-02 18:23:03 +03:00
parent 4f28a0a9a1
commit 0999d8ea8e
3 changed files with 19 additions and 24 deletions
@@ -93,12 +93,12 @@ abstract public class AbstractConstraintSystemTest() : JetLiteFixture() {
for (constraint in constraints) {
val firstType = testDeclarations.getType(constraint.firstType).assertNotError()
val secondType = testDeclarations.getType(constraint.secondType).assertNotError()
val context = ConstraintContext(SPECIAL.position())
val context = ConstraintContext(SPECIAL.position(), initial = true)
when (constraint.kind) {
MyConstraintKind.SUBTYPE -> constraintSystem.addSubtypeConstraint(firstType, secondType, context.position)
MyConstraintKind.SUPERTYPE -> constraintSystem.addSupertypeConstraint(firstType, secondType, context.position)
MyConstraintKind.EQUAL -> constraintSystem.addConstraint(
ConstraintSystemImpl.ConstraintKind.EQUAL, firstType, secondType, context, topLevel = true)
ConstraintSystemImpl.ConstraintKind.EQUAL, firstType, secondType, context)
}
}
if (fixVariables) constraintSystem.fixVariables()