diff --git a/MoreLinq/Permutations.cs b/MoreLinq/Permutations.cs index b700e46fc..fd9698468 100644 --- a/MoreLinq/Permutations.cs +++ b/MoreLinq/Permutations.cs @@ -103,7 +103,14 @@ public void Reset() _hasMoreResults = true; // there's always at least one permutation: the original set itself } - public IList Current => _current!; + public IList Current + { + get + { + Debug.Assert(_current is not null); + return _current; + } + } object IEnumerator.Current => Current;