[Chapel Merge] Spec improvements about extern record initializati

Branch: refs/heads/main
Revision: 28f5438
Author: mppf
Link: Spec improvements about extern record initialization, default init by mppf · Pull Request #18761 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18761 from mppf/docs-follow-up-18542

Spec improvements about extern record initialization, default init

This PR includes docs follow-ups to #18542 to describe in the language
spec what default initializing a variable of extern type will do.

Additionally, it resolves a problem I noticed in the spec where it said
than init() will be called for default initialization even though that
is not true for generic records.

It said:

A variable of a record type declared without an initialization
expression is initialized through a call to the record’s default
initializer, passing no arguments.

However this is not currently true and has not been true for some time.
As described in

Invoking Initializers with a Generic Instantiation — Chapel Documentation 1.25

the compiler will pass by name the type and param components.

Reviewed by @lydia-duncan - thanks!

Modified Files:
M doc/rst/language/spec/interoperability.rst

M doc/rst/language/spec/records.rst

Compare: https://github.com/chapel-lang/chapel/compare/77ee1a180774...28f543848fc7