mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Constraint] NFC: Rename ClosureBodyElement to SyntacticElement
`SyntacticElement` represents a statement, pattern, declaration, condition, or expression and could originate from i.e. a closure, a function or a result builder body.
This commit is contained in:
@@ -2189,7 +2189,7 @@ ConstraintSystem::matchTupleTypes(TupleType *tuple1, TupleType *tuple2,
|
||||
case ConstraintKind::DefaultClosureType:
|
||||
case ConstraintKind::UnresolvedMemberChainBase:
|
||||
case ConstraintKind::PropertyWrapper:
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
case ConstraintKind::SyntacticElement:
|
||||
case ConstraintKind::BindTupleOfFunctionParams:
|
||||
llvm_unreachable("Not a conversion");
|
||||
}
|
||||
@@ -2352,7 +2352,7 @@ static bool matchFunctionRepresentations(FunctionType::ExtInfo einfo1,
|
||||
case ConstraintKind::DefaultClosureType:
|
||||
case ConstraintKind::UnresolvedMemberChainBase:
|
||||
case ConstraintKind::PropertyWrapper:
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
case ConstraintKind::SyntacticElement:
|
||||
case ConstraintKind::BindTupleOfFunctionParams:
|
||||
return true;
|
||||
}
|
||||
@@ -2796,7 +2796,7 @@ ConstraintSystem::matchFunctionTypes(FunctionType *func1, FunctionType *func2,
|
||||
case ConstraintKind::DefaultClosureType:
|
||||
case ConstraintKind::UnresolvedMemberChainBase:
|
||||
case ConstraintKind::PropertyWrapper:
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
case ConstraintKind::SyntacticElement:
|
||||
case ConstraintKind::BindTupleOfFunctionParams:
|
||||
llvm_unreachable("Not a relational constraint");
|
||||
}
|
||||
@@ -6012,7 +6012,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
case ConstraintKind::DefaultClosureType:
|
||||
case ConstraintKind::UnresolvedMemberChainBase:
|
||||
case ConstraintKind::PropertyWrapper:
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
case ConstraintKind::SyntacticElement:
|
||||
case ConstraintKind::BindTupleOfFunctionParams:
|
||||
llvm_unreachable("Not a relational constraint");
|
||||
}
|
||||
@@ -13145,7 +13145,7 @@ ConstraintSystem::addConstraintImpl(ConstraintKind kind, Type first,
|
||||
case ConstraintKind::KeyPath:
|
||||
case ConstraintKind::KeyPathApplication:
|
||||
case ConstraintKind::DefaultClosureType:
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
case ConstraintKind::SyntacticElement:
|
||||
llvm_unreachable("Use the correct addConstraint()");
|
||||
}
|
||||
|
||||
@@ -13675,9 +13675,9 @@ ConstraintSystem::simplifyConstraint(const Constraint &constraint) {
|
||||
constraint.getFirstType(), constraint.getSecondType(),
|
||||
/*flags=*/None, constraint.getLocator());
|
||||
|
||||
case ConstraintKind::ClosureBodyElement:
|
||||
return simplifyClosureBodyElementConstraint(
|
||||
constraint.getClosureElement(), constraint.getElementContext(),
|
||||
case ConstraintKind::SyntacticElement:
|
||||
return simplifySyntacticElementConstraint(
|
||||
constraint.getSyntacticElement(), constraint.getElementContext(),
|
||||
constraint.isDiscardedElement(),
|
||||
/*flags=*/None, constraint.getLocator());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user