Skip to content

Commit f41fe15

Browse files
authored
Turn 3560 off by default, since it's hugely breaking (#16160)
* Turn 3560 off by default, since it's hugely breaking
1 parent bb3a5ce commit f41fe15

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Compiler/Driver/CompilerDiagnostics.fs

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ type PhasedDiagnostic with
387387
| 3390 -> false // xmlDocBadlyFormed - off by default
388388
| 3395 -> false // tcImplicitConversionUsedForMethodArg - off by default
389389
| 3559 -> false // typrelNeverRefinedAwayFromTop - off by default
390+
| 3560 -> false // tcCopyAndUpdateRecordChangesAllFields - off by default
390391
| 3579 -> false // alwaysUseTypedStringInterpolation - off by default
391392
| _ ->
392393
match x.Exception with

tests/FSharp.Compiler.ComponentTests/Diagnostics/Records.fs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let updateOk r = { r with F1 = 1 }
1717
let updateWarn r = { r with F1 = 1; F2 = "" }
1818
"""
1919
|> withLangVersion80
20+
|> withOptions ["--warnon:FS3560"]
2021
|> typecheck
2122
|> shouldFail
2223
|> withDiagnostics [
@@ -46,7 +47,6 @@ type R = { F1: int; F2: string }
4647
let updateWarn r = { r with F1 = 1; F2 = "" }
4748
"""
4849
|> withLangVersion80
49-
|> withOptions ["--nowarn:3560"]
5050
|> typecheck
5151
|> shouldSucceed
5252

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

0 commit comments

Comments
 (0)