Open
Description
Description
func test<each T: Collection>(ts: repeat each T) {
for t in repeat each ts where !t.isEmpty {
// code
}
}
The above code should compile and t
should be a non-empty collection.
Additional information
The problem is that the where
clause is type-checked together with the pattern. We can only get the opened element environment once that's done. Thus, we cannot guarantee that we have it available when the where
clause is type-checked.