Skip to content

Commit

Permalink
Turn 3560 off by default, since it's hugely breaking (#16160)
Browse files Browse the repository at this point in the history
* Turn 3560 off by default, since it's hugely breaking
  • Loading branch information
vzarytovskii committed Oct 23, 2023
1 parent bb3a5ce commit f41fe15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Compiler/Driver/CompilerDiagnostics.fs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ type PhasedDiagnostic with
| 3390 -> false // xmlDocBadlyFormed - off by default
| 3395 -> false // tcImplicitConversionUsedForMethodArg - off by default
| 3559 -> false // typrelNeverRefinedAwayFromTop - off by default
| 3560 -> false // tcCopyAndUpdateRecordChangesAllFields - off by default
| 3579 -> false // alwaysUseTypedStringInterpolation - off by default
| _ ->
match x.Exception with
Expand Down
3 changes: 2 additions & 1 deletion tests/FSharp.Compiler.ComponentTests/Diagnostics/Records.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let updateOk r = { r with F1 = 1 }
let updateWarn r = { r with F1 = 1; F2 = "" }
"""
|> withLangVersion80
|> withOptions ["--warnon:FS3560"]
|> typecheck
|> shouldFail
|> withDiagnostics [
Expand Down Expand Up @@ -46,7 +47,6 @@ type R = { F1: int; F2: string }
let updateWarn r = { r with F1 = 1; F2 = "" }
"""
|> withLangVersion80
|> withOptions ["--nowarn:3560"]
|> typecheck
|> shouldSucceed

Expand Down Expand Up @@ -86,6 +86,7 @@ let t2 (x: RecTy) (a: AnotherNestedRecTy) = { x with D.C.c = { a with A = 3 } }
let t3 (x: RecTy) (a: AnotherNestedRecTy) = { x with D.C.c = { a with A = 3; B = 4 } }
"""
|> withLangVersion80
|> withOptions ["--warnon:FS3560"]
|> typecheck
|> shouldFail
|> withDiagnostics [
Expand Down

0 comments on commit f41fe15

Please sign in to comment.