You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/fsharp/FSComp.txt
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,11 @@ undefinedNameSuggestionsIntro,"Maybe you want one of the following:"
16
16
undefinedNameTypeParameter,"The type parameter %s is not defined."
17
17
undefinedNamePatternDiscriminator,"The pattern discriminator '%s' is not defined."
18
18
replaceWithSuggestion,"Replace with '%s'"
19
+
listElementHasWrongType,"All elements of a list constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'."
20
+
arrayElementHasWrongType,"All elements of an array constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'."
19
21
missingElseBranch,"The 'if' expression is missing an 'else' branch. The 'then' branch has type '%s'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type."
20
22
ifExpression,"The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'."
21
-
elseBranchHasWrongType,"All branches of an 'if' expression must return the same type. This expression was expected to have type '%s' but here has type '%s'."
23
+
elseBranchHasWrongType,"All branches of an 'if' expression must return the same type. This expression was expected to have type '%s', but here has type '%s'."
22
24
commaInsteadOfSemicolonInRecord,"A ';' is used to separate field values in records. Consider replacing ',' with ';'."
23
25
derefInsteadOfNot,"The '!' operator is used to dereference a ref cell. Consider using 'not expr' here."
24
26
buildUnexpectedTypeArgs,"The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s)"
Copy file name to clipboardExpand all lines: tests/fsharp/typecheck/sigs/neg20.bsl
+8-29Lines changed: 8 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -69,35 +69,17 @@ neg20.fs(53,38,53,39): typecheck error FS0001: This expression was expected to h
69
69
but here has type
70
70
'int'
71
71
72
-
neg20.fs(60,26,60,33): typecheck error FS0001: This expression was expectedto have type
73
-
'B'
74
-
but here has type
75
-
'A'
72
+
neg20.fs(60,26,60,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'B', but here has type 'A'.
76
73
77
-
neg20.fs(61,27,61,35): typecheck error FS0001: This expression was expectedto have type
78
-
'B1'
79
-
but here has type
80
-
'B2'
74
+
neg20.fs(61,27,61,35): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'B1', but here has type 'B2'.
81
75
82
-
neg20.fs(62,26,62,33): typecheck error FS0001: This expression was expectedto have type
83
-
'C'
84
-
but here has type
85
-
'B'
76
+
neg20.fs(62,26,62,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'C', but here has type 'B'.
86
77
87
-
neg20.fs(66,25,66,32): typecheck error FS0001: This expression was expectedto have type
88
-
'A'
89
-
but here has type
90
-
'B'
78
+
neg20.fs(66,25,66,32): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'A', but here has type 'B'.
91
79
92
-
neg20.fs(67,27,67,34): typecheck error FS0001: This expression was expectedto have type
93
-
'B'
94
-
but here has type
95
-
'C'
80
+
neg20.fs(67,27,67,34): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'B', but here has type 'C'.
96
81
97
-
neg20.fs(70,31,70,38): typecheck error FS0001: This expression was expectedto have type
98
-
'B'
99
-
but here has type
100
-
'C'
82
+
neg20.fs(70,31,70,38): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'B', but here has type 'C'.
101
83
102
84
neg20.fs(71,34,71,42): typecheck error FS0001: Type mismatch. Expecting a
103
85
'A list'
@@ -128,7 +110,7 @@ but given a
128
110
'B list'
129
111
The type 'A' doesnot match the type 'B'
130
112
131
-
neg20.fs(83,47,83,54): typecheck error FS0001: All branches of an 'if' expression mustreturn the same type. This expression was expectedto have type 'B' but here has type 'C'.
113
+
neg20.fs(83,47,83,54): typecheck error FS0001: All branches of an 'if' expression mustreturn the same type. This expression was expectedto have type 'B', but here has type 'C'.
132
114
133
115
neg20.fs(87,54,87,61): typecheck error FS0001: This expression was expectedto have type
134
116
'B'
@@ -150,10 +132,7 @@ neg20.fs(97,26,97,33): typecheck error FS0001: This expression was expected to h
150
132
but here has type
151
133
'B'
152
134
153
-
neg20.fs(99,26,99,33): typecheck error FS0001: This expression was expectedto have type
154
-
'B'
155
-
but here has type
156
-
'A'
135
+
neg20.fs(99,26,99,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expectedto have type 'B', but here has type 'A'.
157
136
158
137
neg20.fs(108,12,108,16): typecheck error FS0001: Type mismatch. Expecting a
Copy file name to clipboardExpand all lines: tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType.fs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
// #Warnings
2
-
//<Expects status="Error" span="(7,10)">All branches of an 'if' expression must return the same type. This expression was expected to have type 'string' but here has type 'int'.</Expects>
2
+
//<Expects status="Error" span="(7,10)">All branches of an 'if' expression must return the same type. This expression was expected to have type 'string', but here has type 'int'.</Expects>
Copy file name to clipboardExpand all lines: tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType2.fs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
// #Warnings
2
-
//<Expects status="Error">All branches of an 'if' expression must return the same type. This expression was expected to have type 'string' but here has type 'int'.</Expects>
2
+
//<Expects status="Error">All branches of an 'if' expression must return the same type. This expression was expected to have type 'string', but here has type 'int'.</Expects>