@@ -318,4 +318,84 @@ but here has type
318318 |> ignoreWarnings
319319 |> withLangVersionPreview
320320 |> verifyCompileAndRun
321- |> shouldSucceed
321+ |> shouldSucceed
322+
323+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " NamedPatPairs17.fs" |]) >]
324+ let ``Version9 : NamedPatPairs - NamedPatPairs17_fs`` compilation =
325+ compilation
326+ |> ignoreWarnings
327+ |> withLangVersion90
328+ |> typecheck
329+ |> shouldFail
330+ |> withDiagnostics [
331+ ( Error 3350 , Line 10 , Col 21 , Line 10 , Col 22 , " Feature 'Allow comma as union case name field separator.' is not available in F# 9.0. Please use language version 'PREVIEW' or greater." )
332+ ]
333+
334+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " NamedPatPairs17.fs" |]) >]
335+ let ``Preview : NamedPatPairs - NamedPatPairs17_fs`` compilation =
336+ compilation
337+ |> ignoreWarnings
338+ |> withLangVersionPreview
339+ |> typecheck
340+ |> shouldFail
341+ |> withDiagnostics [
342+ ( Error 1 , Line 9 , Col 17 , Line 9 , Col 21 , " This expression was expected to have type
343+ 'int'
344+ but here has type
345+ ''a * 'b' " );
346+ ( Error 1 , Line 10 , Col 17 , Line 10 , Col 21 , " This expression was expected to have type
347+ 'float'
348+ but here has type
349+ ''a * 'b' " );
350+ ( Error 1 , Line 10 , Col 27 , Line 10 , Col 31 , " This expression was expected to have type
351+ 'bool'
352+ but here has type
353+ ''a * 'b' " );
354+ ( Warning 25 , Line 7 , Col 11 , Line 7 , Col 16 , " Incomplete pattern matches on this expression." )
355+ ]
356+
357+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " NamedPatPairs18.fs" |]) >]
358+ let ``Version9 : NamedPatPairs - NamedPatPairs18_fs`` compilation =
359+ compilation
360+ |> ignoreWarnings
361+ |> withLangVersion90
362+ |> typecheck
363+ |> shouldFail
364+ |> withDiagnostics [
365+ ( Error 1 , Line 9 , Col 17 , Line 9 , Col 21 , " This expression was expected to have type
366+ 'int'
367+ but here has type
368+ ''a * 'b' " );
369+ ( Error 1 , Line 10 , Col 17 , Line 10 , Col 21 , " This expression was expected to have type
370+ 'float'
371+ but here has type
372+ ''a * 'b' " );
373+ ( Error 1 , Line 10 , Col 27 , Line 10 , Col 31 , " This expression was expected to have type
374+ 'bool'
375+ but here has type
376+ ''a * 'b' " );
377+ ( Warning 25 , Line 7 , Col 11 , Line 7 , Col 16 , " Incomplete pattern matches on this expression." )
378+ ]
379+
380+ [<Theory; Directory(__ SOURCE_ DIRECTORY__, Includes=[| " NamedPatPairs18.fs" |]) >]
381+ let ``Preview : NamedPatPairs - NamedPatPairs18_fs`` compilation =
382+ compilation
383+ |> ignoreWarnings
384+ |> withLangVersionPreview
385+ |> typecheck
386+ |> shouldFail
387+ |> withDiagnostics [
388+ ( Error 1 , Line 9 , Col 17 , Line 9 , Col 21 , " This expression was expected to have type
389+ 'int'
390+ but here has type
391+ ''a * 'b' " );
392+ ( Error 1 , Line 10 , Col 17 , Line 10 , Col 21 , " This expression was expected to have type
393+ 'float'
394+ but here has type
395+ ''a * 'b' " );
396+ ( Error 1 , Line 10 , Col 27 , Line 10 , Col 31 , " This expression was expected to have type
397+ 'bool'
398+ but here has type
399+ ''a * 'b' " );
400+ ( Warning 25 , Line 7 , Col 11 , Line 7 , Col 16 , " Incomplete pattern matches on this expression." )
401+ ]
0 commit comments