New Issue: Are iterator yield intents the same as return intents for functions?

16231, “dlongnecke-cray”, “Are iterator yield intents the same as return intents for functions?”, “2020-08-13T00:54:22Z”

There doesn’t seem to be a section for iterator yield intents in the spec. I took this to mean that yield intents are the same as return intents for functions, but this doesn’t always seem to be the case.

If iterator yield intents are intended to be the same as function yield intents, could we say as much in the spec?

The most I could find for iterators was:

The intent and type specified after the argument list refer to the type yielded,
not the type returned (see previous bullet). However, they are syntactically
the same as a return-intent and a return-type.

https://chapel-lang.org/docs/language/spec/iterators.html#iterator-definitions