Skip to content

Commit 87a0079

Browse files
committed
[Diagnostic] Always resolve types required for raw representative construction
Since both raw representable and value types originated in constraint system they can have type variables which need to be resolved before types could be used in a diagnostic and fix-it.
1 parent bd65f74 commit 87a0079

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/CSDiagnostics.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,8 +2123,9 @@ class MissingRawRepresentativeInitFailure final : public FailureDiagnostic {
21232123
MissingRawRepresentativeInitFailure(const Solution &solution,
21242124
Type rawReprType, Type valueType,
21252125
ConstraintLocator *locator)
2126-
: FailureDiagnostic(solution, locator), RawReprType(rawReprType),
2127-
ValueType(valueType) {}
2126+
: FailureDiagnostic(solution, locator),
2127+
RawReprType(resolveType(rawReprType)),
2128+
ValueType(resolveType(valueType)) {}
21282129

21292130
bool diagnoseAsError() override;
21302131
};

0 commit comments

Comments
 (0)