mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CS] NFC: Remove CTP_CalleeResult
This has been unused since the removal of CSDiag.
This commit is contained in:
@@ -61,7 +61,6 @@ enum ContextualTypePurpose : uint8_t {
|
||||
/// 'foo(a : @autoclosure () -> Int = 42)'.
|
||||
CTP_AutoclosureDefaultParameter,
|
||||
|
||||
CTP_CalleeResult, ///< Constraint is placed on the result of a callee.
|
||||
CTP_CallArgument, ///< Call to function or operator requires type.
|
||||
CTP_ClosureResult, ///< Closure result expects a specific type.
|
||||
CTP_ArrayElement, ///< ArrayExpr wants elements to have a specific type.
|
||||
|
||||
@@ -9606,7 +9606,6 @@ ExprWalker::rewriteTarget(SyntacticElementTarget target) {
|
||||
case CTP_EnumCaseRawValue:
|
||||
case CTP_DefaultParameter:
|
||||
case CTP_AutoclosureDefaultParameter:
|
||||
case CTP_CalleeResult:
|
||||
case CTP_CallArgument:
|
||||
case CTP_ClosureResult:
|
||||
case CTP_ArrayElement:
|
||||
|
||||
@@ -867,7 +867,6 @@ GenericArgumentsMismatchFailure::getDiagnosticFor(
|
||||
case CTP_Unused:
|
||||
case CTP_CannotFail:
|
||||
case CTP_YieldByReference:
|
||||
case CTP_CalleeResult:
|
||||
case CTP_EnumCaseRawValue:
|
||||
case CTP_ExprPattern:
|
||||
case CTP_SingleValueStmtBranch:
|
||||
@@ -2954,9 +2953,6 @@ getContextualNilDiagnostic(ContextualTypePurpose CTP) {
|
||||
case CTP_CannotFail:
|
||||
llvm_unreachable("These contextual type purposes cannot fail with a "
|
||||
"conversion type specified!");
|
||||
case CTP_CalleeResult:
|
||||
llvm_unreachable("CTP_CalleeResult does not actually install a "
|
||||
"contextual type");
|
||||
case CTP_Initialization:
|
||||
return diag::cannot_convert_initializer_value_nil;
|
||||
|
||||
@@ -3758,7 +3754,6 @@ ContextualFailure::getDiagnosticFor(ContextualTypePurpose context,
|
||||
case CTP_Unused:
|
||||
case CTP_CannotFail:
|
||||
case CTP_YieldByReference:
|
||||
case CTP_CalleeResult:
|
||||
case CTP_ExprPattern:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -16696,7 +16696,6 @@ void ConstraintSystem::addContextualConversionConstraint(
|
||||
|
||||
case CTP_ArrayElement:
|
||||
case CTP_AssignSource:
|
||||
case CTP_CalleeResult:
|
||||
case CTP_CannotFail:
|
||||
case CTP_Condition:
|
||||
case CTP_Unused:
|
||||
|
||||
@@ -263,7 +263,6 @@ bool SyntacticElementTarget::contextualTypeIsOnlyAHint() const {
|
||||
case CTP_EnumCaseRawValue:
|
||||
case CTP_DefaultParameter:
|
||||
case CTP_AutoclosureDefaultParameter:
|
||||
case CTP_CalleeResult:
|
||||
case CTP_CallArgument:
|
||||
case CTP_ClosureResult:
|
||||
case CTP_ArrayElement:
|
||||
|
||||
@@ -28,7 +28,7 @@ do {
|
||||
func foo(x: String = ss) {}
|
||||
}
|
||||
|
||||
// CTP_CalleeResult
|
||||
// CTP_Initialization
|
||||
do {
|
||||
func getSubstring() -> Substring { return ss }
|
||||
let gottenString : String = getSubstring()
|
||||
|
||||
@@ -28,7 +28,7 @@ do {
|
||||
func foo(x: String = String(ss)) {}
|
||||
}
|
||||
|
||||
// CTP_CalleeResult
|
||||
// CTP_Initialization
|
||||
do {
|
||||
func getSubstring() -> Substring { return ss }
|
||||
let gottenString : String = String(getSubstring())
|
||||
|
||||
@@ -30,7 +30,7 @@ do {
|
||||
func foo(x: String = ss) {} // expected-error {{default argument value of type 'Substring' cannot be converted to type 'String'}} {{24-24=String(}} {{26-26=)}}
|
||||
}
|
||||
|
||||
// CTP_CalleeResult
|
||||
// CTP_Initialization
|
||||
do {
|
||||
func getSubstring() -> Substring { return ss }
|
||||
let gottenString : String = getSubstring() // expected-error {{cannot convert value of type 'Substring' to specified type 'String'}} {{31-31=String(}} {{45-45=)}}
|
||||
|
||||
Reference in New Issue
Block a user