Skip to content

Commit 5b80620

Browse files
committed
sd
1 parent 01192b1 commit 5b80620

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Compiler/Symbols/FSharpDiagnostic.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ type FSharpDiagnostic(m: range, severity: FSharpDiagnosticSeverity, message: str
199199

200200
match diagnostic.Exception with
201201
| ErrorFromAddingTypeEquation(_, displayEnv, expectedType, actualType, ConstraintSolverTupleDiffLengths(contextInfo = contextInfo), _)
202-
| ErrorFromAddingTypeEquation(_, displayEnv, expectedType, actualType, ConstraintSolverTypesNotInEqualityRelation(_, _, _, _, _, contextInfo), _)
202+
| ErrorFromAddingTypeEquation(_, displayEnv, _, _, ConstraintSolverTypesNotInEqualityRelation(_, expectedType, actualType, _, _, contextInfo), _)
203203
| ErrorsFromAddingSubsumptionConstraint(_, displayEnv, expectedType, actualType, _, contextInfo, _) ->
204204
let context = DiagnosticContextInfo.From(contextInfo)
205205
Some(TypeMismatchDiagnosticExtendedData(symbolEnv, displayEnv, expectedType, actualType, context))

tests/FSharp.Compiler.ComponentTests/ErrorMessages/ExtendedDiagnosticDataTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ let ``TypeMismatchDiagnosticExtendedData 08`` code =
156156
FSharp code
157157
|> typecheckResults
158158
|> checkDiagnostic
159-
(1, "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ")
159+
(1, "The type 'int' does not match the type 'string'")
160160
(fun (typeMismatch: TypeMismatchDiagnosticExtendedData) ->
161161
let displayContext = typeMismatch.DisplayContext
162162
Assert.Equal(DiagnosticContextInfo.NoContext, typeMismatch.ContextInfo)

0 commit comments

Comments
 (0)