Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn 3560 off by default, since it's hugely breaking #16160

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

@kerams kerams Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the final solution (what about requiring a higher warning level?), it might be good to change how the warning is raised too -ErrorEnabledWithLanguageFeature is now misleading..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not final, quickest one to not ship it.

| 3579 -> false // alwaysUseTypedStringInterpolation - off by default
| _ ->
match x.Exception with
Expand Down
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
Loading