mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix RawRepresentable fix-its for single unlabeled arguments
They were being put outside the call parentheses instead of inside. We even had tests for this; I just got them wrong. https://bugs.swift.org/browse/SR-8150
This commit is contained in:
@@ -4575,9 +4575,10 @@ static bool diagnoseRawRepresentableMismatch(CalleeCandidateInfo &CCI,
|
||||
if (!isRawRepresentableMismatch(argType, paramType, kind, CS))
|
||||
continue;
|
||||
|
||||
auto *expr = argExpr;
|
||||
const Expr *expr = argExpr;
|
||||
if (tupleArgs)
|
||||
expr = tupleArgs->getElement(i);
|
||||
expr = expr->getValueProvidingExpr();
|
||||
|
||||
auto diag =
|
||||
CS.TC.diagnose(expr->getLoc(), diag::cannot_convert_argument_value,
|
||||
|
||||
Reference in New Issue
Block a user