Skip to content

"#if" directive around nullness removed from src/Compiler/Utilities/HashMultiMap.fs #18202

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

Closed
Closed
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
6 changes: 1 addition & 5 deletions src/Compiler/Utilities/HashMultiMap.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
// Each entry in the HashMultiMap dictionary has at least one entry. Under normal usage each entry has _only_
// one entry. So use two hash tables: one for the main entries and one for the overflow.
[<Sealed>]
type internal HashMultiMap<'Key, 'Value
#if !NO_CHECKNULLS
when 'Key:not null
#endif
>(size: int, comparer: IEqualityComparer<'Key>, ?useConcurrentDictionary: bool) =
type internal HashMultiMap<'Key, 'Value>(size: int, comparer: IEqualityComparer<'Key>, ?useConcurrentDictionary: bool) =

let comparer = comparer

let firstEntries: IDictionary<_, _> =
if defaultArg useConcurrentDictionary false then
ConcurrentDictionary<_, _>(comparer)

Check failure on line 17 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build MacOS)

src/Compiler/Utilities/HashMultiMap.fs#L17

src/Compiler/Utilities/HashMultiMap.fs(17,13): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 17 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build Linux)

src/Compiler/Utilities/HashMultiMap.fs#L17

src/Compiler/Utilities/HashMultiMap.fs(17,13): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 17 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci

src/Compiler/Utilities/HashMultiMap.fs#L17

src/Compiler/Utilities/HashMultiMap.fs(17,13): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'
else
Dictionary<_, _>(size, comparer)

Expand All @@ -29,10 +25,10 @@
Dictionary<_, _>(3, comparer)

new(comparer: IEqualityComparer<'Key>, ?useConcurrentDictionary: bool) =
HashMultiMap<'Key, 'Value>(11, comparer, defaultArg useConcurrentDictionary false)

Check failure on line 28 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build MacOS)

src/Compiler/Utilities/HashMultiMap.fs#L28

src/Compiler/Utilities/HashMultiMap.fs(28,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 28 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build Linux)

src/Compiler/Utilities/HashMultiMap.fs#L28

src/Compiler/Utilities/HashMultiMap.fs(28,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 28 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci

src/Compiler/Utilities/HashMultiMap.fs#L28

src/Compiler/Utilities/HashMultiMap.fs(28,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

new(entries: seq<'Key * 'Value>, comparer: IEqualityComparer<'Key>, ?useConcurrentDictionary: bool) as this =
HashMultiMap<'Key, 'Value>(11, comparer, defaultArg useConcurrentDictionary false)

Check failure on line 31 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build MacOS)

src/Compiler/Utilities/HashMultiMap.fs#L31

src/Compiler/Utilities/HashMultiMap.fs(31,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 31 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build Linux)

src/Compiler/Utilities/HashMultiMap.fs#L31

src/Compiler/Utilities/HashMultiMap.fs(31,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 31 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci

src/Compiler/Utilities/HashMultiMap.fs#L31

src/Compiler/Utilities/HashMultiMap.fs(31,9): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'
then entries |> Seq.iter (fun (k, v) -> this.Add(k, v))

member _.GetRest(k) =
Expand Down Expand Up @@ -154,8 +150,8 @@
interface IDictionary<'Key, 'Value> with

member s.Item
with get x = s[x]

Check failure on line 153 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build MacOS)

src/Compiler/Utilities/HashMultiMap.fs#L153

src/Compiler/Utilities/HashMultiMap.fs(153,26): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 153 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build Linux)

src/Compiler/Utilities/HashMultiMap.fs#L153

src/Compiler/Utilities/HashMultiMap.fs(153,26): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'
and set x v = s[x] <- v

Check failure on line 154 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build MacOS)

src/Compiler/Utilities/HashMultiMap.fs#L154

src/Compiler/Utilities/HashMultiMap.fs(154,27): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

Check failure on line 154 in src/Compiler/Utilities/HashMultiMap.fs

View check run for this annotation

Azure Pipelines / fsharp-ci (Build Linux)

src/Compiler/Utilities/HashMultiMap.fs#L154

src/Compiler/Utilities/HashMultiMap.fs(154,27): error FS0193: (NETCORE_ENGINEERING_TELEMETRY=Build) A type parameter is missing a constraint 'when 'Key: not null'

member s.Keys = ([| for kvp in s -> kvp.Key |] :> ICollection<'Key>)

Expand Down
Loading