Skip to content

Commit 4cce423

Browse files
committed
Add correct error message patterns
1 parent be2b284 commit 4cce423

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tests/fsharpqa/Source/Warnings/ReturnInsteadOfReturnBang.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// #Warnings
2-
//<Expects status="Error" span="(4,32)" id="FS0001">Type mismatch. Expecting a.+''a'.+but given a.+'Async<'a>'.+The types ''a' and 'Async<'a>' cannot be unified. Consider using 'return!' instead of 'return'.*</Expects>
2+
//<Expects status="Error" span="(8,32)" id="FS0001">Type mismatch. Expecting a</Expects>
3+
//<Expects>''a'</Expects>
4+
//<Expects>but given a</Expects>
5+
//<Expects>'Async<'a>'</Expects>
6+
//<Expects>The types ''a' and 'Async<'a>' cannot be unified. Consider using 'return!' instead of 'return'.</Expects>
37

48
let rec foo() = async { return foo() }
59

tests/fsharpqa/Source/Warnings/YieldInsteadOfYieldBang.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// #Warnings
2-
//<Expects status="Error" span="(7,30)" id="FS0001">.Type mismatch. Expecting a.+''a'.+but given a.+''a list'.+The types ''a' and ''a list' cannot be unified. Consider using 'yield!' instead of 'yield'.*</Expects>
2+
//<Expects status="Error" span="(11,30)" id="FS0001">Type mismatch. Expecting a</Expects>
3+
//<Expects>''a'</Expects>
4+
//<Expects>but given a</Expects>
5+
//<Expects>''a list'</Expects>
6+
//<Expects>The types ''a' and ''a list' cannot be unified. Consider using 'yield!' instead of 'yield'.</Expects>
37

48
type Foo() =
59
member this.Yield(x) = [x]

0 commit comments

Comments
 (0)