Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44514f3

Browse files
kbattocchiKevinRansom
authored andcommitted
Fixdotnet#2365 by making the error message specific to the expected type (dotnet#2366)
1 parentccf2cf5 commit44514f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/fsharp/FSharp.Core/FSCore.resx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
<value>Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'.</value>
416416
</data>
417417
<dataname="QtmmRaw"xml:space="preserve">
418-
<value>Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x :string) or (%x :string).</value>
418+
<value>Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x :{0}) or (%x :{0}).</value>
419419
</data>
420420
<dataname="QtupleAccessOutOfRange"xml:space="preserve">
421421
<value>Tuple access out of range</value>

‎tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Regressions/E_QuotationHoles01.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ try
1212
exit1
1313
with
1414
|:? System.ArgumentExceptionas e->
15-
letexpected="Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected 'System.String', but received type 'System.Object'. Consider type-annotating with the expected expression type, e.g., (%% x :string) or (%x :string)."
15+
letexpected="Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected 'System.String', but received type 'System.Object'. Consider type-annotating with the expected expression type, e.g., (%% x :System.String) or (%x :System.String)."
1616
ifnot(e.Message.Contains(expected))then
1717
printfn"%A"(e.Message)
1818
exit1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp