[Chapel Merge] spec: update specification with variable declaration exceptions

Branch: refs/heads/main
Revision: fcb7aebb421b7f45f4a350ae30ec35038d6547c6
Author: DanilaFe
Link: spec: update specification with variable declaration exceptions. by DanilaFe · Pull Request #28609 · chapel-lang/chapel · GitHub
Log Message:
spec: update specification with variable declaration exceptions. (#28609)

Variable types for var x = e are not always determined by e.type; in
some cases (most notably iterator expressions), the final type can be
different. This PR weakens the spec's claim that this is always the
case, by introducing the word "usually" and explicitly listing the big
exception. There may be other exceptions, but I can't think of them and
suspect they'd be in unstable portions of the language anyway (and so
wouldn't belong in the spec)

Reviewed by @bradcray -- thanks!

Testing

  • make docs, looks good
  • paratest

Compare: Comparing d502ad76f4d1c632808c298094ce804a9684dd69...9588616b809e713354247dc0f6b17336f9729879 · chapel-lang/chapel · GitHub

Diff:
M doc/rst/language/spec/variables.rst
https://github.com/chapel-lang/chapel/pull/28609.diff