mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Introduce PlaceholderType and ThePlaceholderType singleton
This commit is contained in:
committed by
Freddy Kellison-Linn
parent
580fd40540
commit
d78d95ef0d
@@ -4901,6 +4901,9 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
|
||||
case TypeKind::Unresolved:
|
||||
return getTypeMatchFailure(locator);
|
||||
|
||||
case TypeKind::Placeholder:
|
||||
llvm_unreachable("placeholders should already be converted to type vars");
|
||||
|
||||
case TypeKind::Hole: {
|
||||
// If it's allowed to attempt fixes, let's delegate
|
||||
// decision to `repairFailures`, since depending on
|
||||
@@ -5596,6 +5599,7 @@ ConstraintSystem::simplifyConstructionConstraint(
|
||||
llvm_unreachable("artificial type in constraint");
|
||||
|
||||
case TypeKind::Unresolved:
|
||||
case TypeKind::Placeholder:
|
||||
case TypeKind::Error:
|
||||
case TypeKind::Hole:
|
||||
return SolutionKind::Error;
|
||||
|
||||
Reference in New Issue
Block a user