Skip to content

Commit 1738018

Browse files
committed
update tests
1 parent 55507e9 commit 1738018

File tree

7 files changed

+52
-51
lines changed

7 files changed

+52
-51
lines changed

tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ match () with
4141
dumpDiagnostics checkResults |> shouldEqual [
4242
"(3,2--3,25): Attributes are not allowed within patterns"
4343
"(3,4--3,23): This attribute is not valid for use on this language element"
44+
"(3,17--3,22): This is not a valid constant expression or custom attribute value"
4445
]
4546

4647

tests/fsharp/Compiler/Language/StructActivePatternTests.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ let (|Foo|_|) x = ValueNone
176176
[<Struct>]
177177
let (|Foo|_|) x = ValueNone
178178
"""
179-
[|(FSharpDiagnosticSeverity.Error, 842, (2, 3, 2, 9),
179+
[|(FSharpDiagnosticSeverity.Warning, 842, (2, 3, 2, 9),
180180
"This attribute is not valid for use on this language element");
181181
(FSharpDiagnosticSeverity.Error, 3350, (3, 6, 3, 13),
182182
"Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.")|]

tests/fsharp/typecheck/sigs/neg16.bsl

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ neg16.fs(44,10,44,11): typecheck error FS0934: Records, union, abbreviations and
1313

1414
neg16.fs(47,10,47,13): typecheck error FS0934: Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute
1515

16-
neg16.fs(49,7,49,23): typecheck error FS0842: This attribute is not valid for use on this language element
16+
neg16.fs(49,7,49,23): typecheck warning FS0842: This attribute is not valid for use on this language element
1717

18-
neg16.fs(52,7,52,23): typecheck error FS0842: This attribute is not valid for use on this language element
18+
neg16.fs(52,7,52,23): typecheck warning FS0842: This attribute is not valid for use on this language element
1919

2020
neg16.fs(59,8,59,17): typecheck error FS0001: This expression was expected to have type
2121
'Choice<'a,'b>'

tests/fsharp/typecheck/sigs/neg20.bsl

+23-23
Original file line numberDiff line numberDiff line change
@@ -213,53 +213,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to
213213
but here has type
214214
'objnull'
215215

216-
neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element
216+
neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element
217217

218-
neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element
218+
neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element
219219

220220
neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations
221221

222-
neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element
222+
neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element
223223

224-
neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element
224+
neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element
225225

226-
neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element
226+
neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element
227227

228-
neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element
228+
neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element
229229

230-
neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element
230+
neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element
231231

232-
neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element
232+
neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element
233233

234-
neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element
234+
neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element
235235

236-
neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element
236+
neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element
237237

238-
neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element
238+
neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element
239239

240-
neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element
240+
neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element
241241

242-
neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element
242+
neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element
243243

244-
neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element
244+
neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element
245245

246-
neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element
246+
neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element
247247

248-
neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element
248+
neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element
249249

250-
neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element
250+
neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element
251251

252-
neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element
252+
neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element
253253

254-
neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element
254+
neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element
255255

256-
neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element
256+
neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element
257257

258-
neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element
258+
neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element
259259

260-
neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element
260+
neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element
261261

262-
neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element
262+
neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element
263263

264264
neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments.
265265

tests/fsharp/typecheck/sigs/neg32.bsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
neg32.fs(17,11,17,56): typecheck error FS0842: This attribute is not valid for use on this language element
2+
neg32.fs(17,11,17,56): typecheck warning FS0842: This attribute is not valid for use on this language element
33

44
neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 2 arguments.
55

tests/fsharp/typecheck/sigs/version50/neg20.bsl

+23-23
Original file line numberDiff line numberDiff line change
@@ -261,53 +261,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to
261261
but here has type
262262
'objnull'
263263

264-
neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element
264+
neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element
265265

266-
neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element
266+
neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element
267267

268268
neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations
269269

270-
neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element
270+
neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element
271271

272-
neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element
272+
neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element
273273

274-
neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element
274+
neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element
275275

276-
neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element
276+
neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element
277277

278-
neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element
278+
neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element
279279

280-
neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element
280+
neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element
281281

282-
neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element
282+
neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element
283283

284-
neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element
284+
neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element
285285

286-
neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element
286+
neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element
287287

288-
neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element
288+
neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element
289289

290-
neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element
290+
neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element
291291

292-
neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element
292+
neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element
293293

294-
neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element
294+
neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element
295295

296-
neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element
296+
neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element
297297

298-
neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element
298+
neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element
299299

300-
neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element
300+
neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element
301301

302-
neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element
302+
neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element
303303

304-
neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element
304+
neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element
305305

306-
neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element
306+
neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element
307307

308-
neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element
308+
neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element
309309

310-
neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element
310+
neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element
311311

312312
neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments.
313313

tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// #Regression #Conformance #UnitsOfMeasure #ObjectOrientedTypes
22
// Verify error when putting invalid attributes on type arguments
33
// (We should only allow [<Measure>].)
4-
//<Expects id="FS0842" status="error" span="(8,36)">This attribute is not valid for use on this language element</Expects>
4+
//<Expects id="FS0842" status="warning" span="(8,36)">This attribute is not valid for use on this language element</Expects>
55

66
open System
77

0 commit comments

Comments
 (0)