Skip to content

Commit dd3f7ea

Browse files
authored
Restore missing T (#589)
1 parent 9ce773f commit dd3f7ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

standard/statements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ The compile-time processing of a `foreach` statement first determines the ***col
858858
- Overload resolution is performed on the method group with an empty argument list. If overload resolution results in no applicable methods, results in an ambiguity, or results in a single best method but that method is either static or not public, or its return type is not `bool`, an error is produced and no further steps are taken.
859859
- The collection type is `X`, the enumerator type is `E`, and the iteration type is the type of the `Current` property.
860860
- Otherwise, check for an enumerable interface:
861-
- If among all the types `Tᵢ` for which there is an implicit conversion from `X` to `IEnumerable<>`, there is a unique type `T` such that `T` is not dynamic and for all the other `Tᵢ` there is an implicit conversion from `IEnumerable<T>` to `IEnumerable<Tᵢ>`, then the collection type is the interface `IEnumerable<T>`, the enumerator type is the interface `IEnumerator<T>`, and the iteration type is `T`.
861+
- If among all the types `Tᵢ` for which there is an implicit conversion from `X` to `IEnumerable<Tᵢ>`, there is a unique type `T` such that `T` is not `dynamic` and for all the other `Tᵢ` there is an implicit conversion from `IEnumerable<T>` to `IEnumerable<Tᵢ>`, then the collection type is the interface `IEnumerable<T>`, the enumerator type is the interface `IEnumerator<T>`, and the iteration type is `T`.
862862
- Otherwise, if there is more than one such type `T`, then an error is produced and no further steps are taken.
863863
- Otherwise, if there is an implicit conversion from `X` to the `System.Collections.IEnumerable` interface, then the collection type is this interface, the enumerator type is the interface `System.Collections.IEnumerator`, and the iteration type is `object`.
864864
- Otherwise, an error is produced and no further steps are taken.

0 commit comments

Comments
 (0)