Skip to content

Commit 264964b

Browse files
committed
Update baselines
1 parent 0aef154 commit 264964b

File tree

12 files changed

+37
-14
lines changed

12 files changed

+37
-14
lines changed

tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MemberDefinitions/MethodsAndProperties/MethodsAndProperties.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ module MemberDefinitions_MethodsAndProperties =
121121
(Error 1, Line 11, Col 24, Line 11, Col 33, "This expression was expected to have type\n ''a array2d' \nbut here has type\n 'int array' ")
122122
(Error 1, Line 12, Col 25, Line 12, Col 32, "This expression was expected to have type\n ''a array' \nbut here has type\n 'int array2d' ")
123123
(Error 1, Line 13, Col 26, Line 13, Col 37, "This expression was expected to have type\n ''a array' \nbut here has type\n 'int array3d' ")
124+
(Error 1, Line 13, Col 32, Line 13, Col 35, "This expression was expected to have type\n 'int' \nbut here has type\n 'int * int' ")
124125
(Error 1, Line 14, Col 27, Line 14, Col 38, "This expression was expected to have type\n ''a array' \nbut here has type\n 'int array4d' ")
126+
(Error 1, Line 14, Col 33, Line 14, Col 36, "This expression was expected to have type\n 'int' \nbut here has type\n 'int * int' ")
125127
]
126128

127129
// SOURCE=E_IndexerArityMismatch02.fs SCFLAGS="--test:ErrorRanges --flaterrors" # E_IndexerArityMismatch02.fs

tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/TypeAbbreviations/TypeAbbreviations.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ module TypeAbbreviations =
8585
|> shouldFail
8686
|> withDiagnostics [
8787
(Error 1, Line 16, Col 14, Line 16, Col 19, "A type parameter is missing a constraint 'when 'b :> IB'")
88-
(Error 35, Line 16, Col 6, Line 16, Col 7, "This construct is deprecated: This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'.")
8988
]
9089

9190
//SOURCE=E_DroppedTypeVariable01.fsx SCFLAGS="--test:ErrorRanges -a" # E_DroppedTypeVariable01.fsx

tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ let _ = Test<DoubleType<DoubleType<int option>>>()
6969
|> shouldFail
7070
|> withDiagnostics [
7171
Error 1, Line 10, Col 9, Line 10, Col 33, "A generic construct requires that the type 'DoubleType<string>' is an unmanaged type"
72-
Error 1, Line 11, Col 9, Line 11, Col 49, "A generic construct requires that the type 'DoubleType<DoubleType<int option>>' is an unmanaged type" ]
72+
Error 1, Line 11, Col 9, Line 11, Col 49, "A generic construct requires that the type 'DoubleType<DoubleType<int option>>' is an unmanaged type"
73+
Error 688, Line 11, Col 9, Line 11, Col 51, "The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization"
74+
]
7375

7476
[<Fact>]
7577
let ``voption considered unmanaged when inner type is unmanaged`` () =
@@ -348,7 +350,9 @@ let _ = Test<MyDu<int,MyDu<int,string voption>>>()
348350
Error 193, Line 26, Col 24, Line 26, Col 36, "A generic construct requires that the type 'A<'T,obj>' is an unmanaged type"
349351
Error 1, Line 27, Col 9, Line 27, Col 18, "A generic construct requires that the type 'obj' is an unmanaged type"
350352
Error 1, Line 28, Col 9, Line 28, Col 28, "A generic construct requires that the type 'NonStructRecd' is an unmanaged type"
351-
Error 1, Line 29, Col 9, Line 29, Col 49, "A generic construct requires that the type 'string' is an unmanaged type" ]
353+
Error 688, Line 28, Col 9, Line 28, Col 30, "The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization"
354+
Error 1, Line 29, Col 9, Line 29, Col 49, "A generic construct requires that the type 'string' is an unmanaged type"
355+
]
352356

353357
[<Fact>]
354358
let ``Disallow both 'unmanaged' and 'not struct' constraints`` () =

tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ but here has type
520520
'AsString'
521521
but here has type
522522
'SomeDu' "
523-
Warning 25, Line 30, Col 19, Line 30, Col 23, "Incomplete pattern matches on this expression."]
523+
]
524524

525525
[<Fact>]
526526
let ``Object expression implementing multiple interfaces`` () =

tests/FSharp.Compiler.ComponentTests/Conformance/PatternMatching/ConsList/ConsList.fs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ but here has type
4646
|> withOptions ["--test:ErrorRanges"]
4747
|> typecheck
4848
|> shouldFail
49-
|> withSingleDiagnostic (Error 1, Line 15, Col 22, Line 15, Col 24, "This expression was expected to have type
50-
'int'
51-
but here has type
52-
''a list' ")
49+
|> withDiagnostics [
50+
(Error 1, Line 15, Col 22, Line 15, Col 24, "This expression was expected to have type\n 'int' \nbut here has type\n ''a list' ")
51+
(Error 1, Line 16, Col 14, Line 16, Col 16, "This expression was expected to have type\n 'int' \nbut here has type\n ''a list' ")
52+
(Warning 25, Line 13, Col 11, Line 13, Col 12, "Incomplete pattern matches on this expression. For example, the value '[_]' may indicate a case not covered by the pattern(s).")
53+
(Warning 26, Line 15, Col 7, Line 15, Col 18, "This rule will never be matched")
54+
(Warning 26, Line 16, Col 7, Line 16, Col 24, "This rule will never be matched")
55+
]
5356

5457
// This test was automatically generated (moved from FSharpQA suite - Conformance/PatternMatching/ConsList)
5558
[<Theory; FileInlineData("OutsideMatch01.fs")>]

tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ let x() = ({| b = 2; c = 3 |} = {| a = 2; d = "" |} )
238238
|> shouldFail
239239
|> withDiagnostics [
240240
(Error 1, Line 2, Col 33, Line 2, Col 52, "This anonymous record should have fields 'b', 'c'; but here has fields 'a', 'd'.")
241+
(Error 1, Line 2, Col 47, Line 2, Col 49, "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")
241242
]
242243

243244
[<Fact>]

tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ module RecordTypes =
130130
|> shouldFail
131131
|> withDiagnostics [
132132
(Error 1, Line 7, Col 17, Line 7, Col 47, "This expression was expected to have type\n 'int array' \nbut here has type\n 'RecType' ")
133+
(Error 786, Line 7, Col 17, Line 7, Col 47, "The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... }");
134+
(Error 791, Line 7, Col 17, Line 7, Col 47, "This type is not a record type");
135+
(Error 763, Line 7, Col 17, Line 7, Col 47, "The field 'B' has been given a value, but is not present in the type 'int array'")
133136
]
134137

135138
// SOURCE=E_RecordsNotNull01.fs # E_RecordsNotNull01.fs

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ let x = { Name = "Isaac", Age = 21, City = "London" }
3131
|> shouldFail
3232
|> withDiagnostics [
3333
(Error 1, Line 3, Col 18, Line 3, Col 52, "This expression was expected to have type\n 'string' \nbut here has type\n ''a * 'b * 'c' " + System.Environment.NewLine + "A ';' is used to separate field values in records. Consider replacing ',' with ';'.")
34+
(Error 39, Line 3, Col 27, Line 3, Col 30, "The value or constructor 'Age' is not defined.")
35+
(Error 39, Line 3, Col 37, Line 3, Col 41, "The value or constructor 'City' is not defined.")
3436
(Error 764, Line 3, Col 9, Line 3, Col 54, "No assignment given for field 'Age' of type 'Test.Person'")]
3537

3638
[<Fact>]

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ let y =
119119
"""
120120
|> typecheck
121121
|> shouldFail
122-
|> withSingleDiagnostic (Error 1, Line 7, Col 14, Line 7, Col 22,
123-
"This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")
122+
|> withDiagnostics [
123+
(Error 1, Line 7, Col 14, Line 7, Col 22, "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")
124+
(Error 1, Line 8, Col 26, Line 8, Col 27, "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ")
125+
]
124126

125127
[<Fact>]
126128
let ``Else branch context doesn't propagate to lines before last line``() =

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ type Derived3() =
292292
|> withDiagnostics [
293293
(Error 856, Line 8, Col 16, Line 8, Col 22, "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract Base.Member: int * string -> string")
294294
(Error 856, Line 12, Col 16, Line 12, Col 22, "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract Base.Member: int * string -> string")
295-
(Error 1, Line 16, Col 24, Line 16, Col 34, "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")]
295+
(Error 1, Line 16, Col 24, Line 16, Col 34, "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")
296+
(Error 1, Line 16, Col 36, Line 16, Col 43, "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ");
297+
(Error 1, Line 16, Col 66, Line 16, Col 67, "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ")
298+
]
296299

297300
[<Fact>]
298301
let ``Interface member with tuple argument should give error message with better solution``() =

0 commit comments

Comments
 (0)