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: docs/fsharp/language-reference/compiler-options.md
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -78,11 +78,18 @@ The F# compiler supports several opt-in warnings:
78
78
| 1178 | Implicit equality/comparison | 5 | Warn when an F# type declaration is implicitly inferred to be `NoEquality` or `NoComparison` but the attribute is not present on the type. |
| 3180 | Implicit heap allocations | n/a | Warn when a mutable local is implicitly allocated as a reference cell because it has been captured by a closure. |
81
+
| 3186 | Missing metadata declaration | n/a | Warn when an F# metadata node has no matching declaration. May indicate a broken assembly; recompilation might be required. |
81
82
| 3366 | Index notation | n/a | Warn when the F# 5 index notation `expr.[idx]` is used. |
82
-
| 3517 | InlineIfLambda failure | n/a | Warn when the F# optimizer fails to inline an `InlineIfLambda` value, for example if a computed function value has been provided instead of an explicit lambda. |
83
83
| 3388 | Additional implicit upcast | n/a | Warn when an additional upcast is implicitly used, added in F# 6. |
84
84
| 3389 | Implicit widening | n/a | Warn when an implicit numeric widening is used. |
85
85
| 3390 | Malformed XML doc comments | n/a | Warn when XML doc comments are malformed in various ways. |
86
+
| 3395 | Implicit method argument conversion | n/a | Warn when an implicit conversion is used to match the type of a method argument. |
87
+
| 3517 | InlineIfLambda failure | n/a | Warn when the F# optimizer fails to inline an `InlineIfLambda` value, for example if a computed function value has been provided instead of an explicit lambda. |
88
+
| 3559 | Type inferred as obj | n/a | Warn when a type is implicitly inferred as 'obj'. Suggest adding explicit type annotations. |
89
+
| 3560 | All fields changed in record copy | n/a | Warn when a record copy-and-update expression changes all fields. Recommend using record construction syntax. |
90
+
| 3570 | Ambiguous discard or shorthand | n/a | Warn when '_' is ambiguously used both as a discard and a function shorthand in the same scope. |
91
+
| 3579 | Untyped string interpolation | n/a | Warn when interpolated strings contain untyped values. Typed format specifiers are recommended. |
92
+
| 3582 | Function shadows union case | n/a | Warn when a function definition unintentionally shadows a union case. Use parentheses to disambiguate. |
86
93
87
94
You can enable these warnings by using `/warnon:NNNN` or `<WarnOn>NNNN</WarnOn>` where `NNNN` is the relevant warning number.
88
95
(You may also use the syntax `<WarnOn>FSNNNN</WarnOn>`, for example, `<WarnOn>FS3388</WarnOn>`.)
0 commit comments