Skip to content

Commit

Permalink
Turn 3560 off by default, since it's hugely breaking (dotnet#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 authored and ncave committed Oct 25, 2023
1 parent ad39ec6 commit e724fdc
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
| 3582 -> false // infoIfFunctionShadowsUnionCase - off by default
| _ ->
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 e724fdc

Please sign in to comment.