Skip to content

Commit 176877f

Browse files
stephentoubsirntar
authored andcommitted
Fix constraint on FrozenSet.{Try}GetAlternateLookup (dotnet#107846)
Normally we would have caught this oversight immediately, as tests would have failed to compile, but unlike the vast majority of our test suites, System.Collections.Immutable's test suite references the implementation assembly rather than the ref assembly, in order to access internals via InternalsVisibleTo. Grrr.
1 parent 6a0292a commit 176877f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.net9.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public abstract partial class FrozenDictionary<TKey, TValue>
2222
}
2323
public abstract partial class FrozenSet<T>
2424
{
25-
public System.Collections.Frozen.FrozenSet<T>.AlternateLookup<TAlternate> GetAlternateLookup<TAlternate>() { throw null; }
26-
public bool TryGetAlternateLookup<TAlternate>(out System.Collections.Frozen.FrozenSet<T>.AlternateLookup<TAlternate> lookup) { throw null; }
27-
public readonly partial struct AlternateLookup<TAlternate>
25+
public System.Collections.Frozen.FrozenSet<T>.AlternateLookup<TAlternate> GetAlternateLookup<TAlternate>() where TAlternate : allows ref struct { throw null; }
26+
public bool TryGetAlternateLookup<TAlternate>(out System.Collections.Frozen.FrozenSet<T>.AlternateLookup<TAlternate> lookup) where TAlternate : allows ref struct { throw null; }
27+
public readonly partial struct AlternateLookup<TAlternate> where TAlternate : allows ref struct
2828
{
2929
private readonly object _dummy;
3030
private readonly int _dummyPrimitive;

0 commit comments

Comments
 (0)