Skip to content

Commit

Permalink
Change the conflicted error number of `Access-modifies-to-auto-proper…
Browse files Browse the repository at this point in the history
…ties` (#17522)
  • Loading branch information
ijklam authored Aug 12, 2024
1 parent 99e122d commit f61dc16
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/release-notes/.FSharp.Compiler.Service/9.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Parser: recover on missing union case fields (PR [#17452](https://github.com/dotnet/fsharp/pull/17452))
* Parser: recover on missing union case field types (PR [#17455](https://github.com/dotnet/fsharp/pull/17455))
* Sink: report function domain type ([PR #17470](https://github.com/dotnet/fsharp/pull/17470))
* Allow access modifies to auto properties getters and setters ([PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430))
* Allow access modifies to auto properties getters and setters ([Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430), [PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [PR 17522](https://github.com/dotnet/fsharp/pull/17522))
* Render C# nullable-analysis attributes in tooltips ([PR #17485](https://github.com/dotnet/fsharp/pull/17485))

### Changed
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/.Language/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Bidirectional F#/C# interop for 'unmanaged' constraint. ([PR #12154](https://github.com/dotnet/fsharp/pull/12154))
* Make `.Is*` discriminated union properties visible. ([Language suggestion #222](https://github.com/fsharp/fslang-suggestions/issues/222), [PR #16341](https://github.com/dotnet/fsharp/pull/16341))
* Allow returning bool instead of unit option for partial active patterns. ([Language suggestion #1041](https://github.com/fsharp/fslang-suggestions/issues/1041), [PR #16473](https://github.com/dotnet/fsharp/pull/16473))
* Allow access modifies to auto properties getters and setters ([PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430))
* Allow access modifies to auto properties getters and setters ([Language suggestion #430](https://github.com/fsharp/fslang-suggestions/issues/430), [PR 16687](https://github.com/dotnet/fsharp/pull/16687), [PR 16861](https://github.com/dotnet/fsharp/pull/16861), [PR 17522](https://github.com/dotnet/fsharp/pull/17522))
* Allow #nowarn to support the FS prefix on error codes to disable warnings ([Issue #17206](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209))
* Allow ParsedHashDirectives to have argument types other than strings ([Issue #17240](https://github.com/dotnet/fsharp/issues/16447), [PR #17209](https://github.com/dotnet/fsharp/pull/17209))
* Support empty-bodied computation expressions. ([Language suggestion #1232](https://github.com/fsharp/fslang-suggestions/issues/1232), [PR #17352](https://github.com/dotnet/fsharp/pull/17352))
Expand Down
8 changes: 4 additions & 4 deletions src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1771,10 +1771,10 @@ featureReuseSameFieldsInStructUnions,"Share underlying fields in a [<Struct>] di
3868,tcActivePatternArgsCountNotMatchOnlyPat,"This active pattern expects exactly one pattern argument, e.g., '%s pat'."
3868,tcActivePatternArgsCountNotMatchArgs,"This active pattern expects %d expression argument(s), e.g., '%s%s'."
3868,tcActivePatternArgsCountNotMatchArgsAndPat,"This active pattern expects %d expression argument(s) and a pattern argument, e.g., '%s%s pat'."
featureAllowAccessModifiersToAutoPropertiesGettersAndSetters,"Allow access modifiers to auto properties getters and setters"
3869,tcAccessModifiersNotAllowedInSRTPConstraint,"Access modifiers cannot be applied to an SRTP constraint."
featureParsedHashDirectiveArgumentNonString,"# directives with non-quoted string arguments"
3870,featureParsedHashDirectiveUnexpectedInteger,"Unexpected integer literal '%d'."
3870,featureParsedHashDirectiveUnexpectedIdentifier,"Unexpected identifier '%s'."
3869,featureParsedHashDirectiveUnexpectedInteger,"Unexpected integer literal '%d'."
3869,featureParsedHashDirectiveUnexpectedIdentifier,"Unexpected identifier '%s'."
featureEmptyBodiedComputationExpressions,"Support for computation expressions with empty bodies: builder {{ }}"
3870,parsExpectingUnionCaseField,"Expecting union case field"
featureAllowAccessModifiersToAutoPropertiesGettersAndSetters,"Allow access modifiers to auto properties getters and setters"
3871,tcAccessModifiersNotAllowedInSRTPConstraint,"Access modifiers cannot be applied to an SRTP constraint."
2 changes: 1 addition & 1 deletion src/Compiler/SyntaxTree/SyntaxTree.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ type SynComponentInfo =
/// Gets the syntax range of this construct
member Range: range

/// Represents two access
/// Represents one or two access modifier(s) in a property signature
[<NoEquality; NoComparison; RequireQualifiedAccess>]
type SynValSigAccess =
| Single of accessibility: SynAccess option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1282,10 +1282,10 @@ let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.
|> typecheck
|> shouldFail
|> withDiagnostics [
(Error 3869, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3869, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3869, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3869, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3871, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3871, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3871, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Error 3871, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.")
]

[<Fact>]
Expand All @@ -1300,10 +1300,10 @@ let inline length4 (x: ^a when ^a: (member public get_Length: unit -> int)) = x.
|> typecheck
|> shouldFail
|> withDiagnostics [
(Warning 3869, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3869, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3869, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3869, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3871, Line 2, Col 43, Line 2, Col 49, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3871, Line 3, Col 61, Line 3, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3871, Line 4, Col 61, Line 4, Col 67, "Access modifiers cannot be applied to an SRTP constraint.")
(Warning 3871, Line 5, Col 44, Line 5, Col 50, "Access modifiers cannot be applied to an SRTP constraint.")
]

[<FactForNETCOREAPP>]
Expand Down
10 changes: 5 additions & 5 deletions tests/FSharp.Compiler.ComponentTests/ErrorMessages/Directives.fs
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ printfn "Hello, World"
|> asExe
|> compile
|> shouldFail
|> withDiagnostics[
|> withDiagnostics [
(Warning 3353, Line 2, Col 9, Line 2, Col 11, "Invalid directive '#r '")
(Warning 213, Line 3, Col 9, Line 3, Col 14, "'' is not a valid assembly name")
(Error 3870, Line 4, Col 12, Line 4, Col 17, "Unexpected identifier 'Ident'.")
(Error 3870, Line 5, Col 12, Line 5, Col 22, "Unexpected identifier 'Long.Ident'.")
(Error 3870, Line 6, Col 12, Line 6, Col 15, "Unexpected integer literal '123'.")
]
(Error 3869, Line 4, Col 12, Line 4, Col 17, "Unexpected identifier 'Ident'.")
(Error 3869, Line 5, Col 12, Line 5, Col 22, "Unexpected identifier 'Long.Ident'.")
(Error 3869, Line 6, Col 12, Line 6, Col 15, "Unexpected integer literal '123'.")
]

0 comments on commit f61dc16

Please sign in to comment.