The SILGen testsuite consists of valid Swift code covering most language
features. We use these tests to verify that no unknown nodes are in the
file's libSyntax tree. That way we will (hopefully) catch any future
changes or additions to the language which are not implemented in
libSyntax.
Because of a ill-advised core team decision, Swift now
allows @_inlineable root initializers on types that
are not @_fixed_layout (aa85e4512f).
Since stored property initializers of types that are not
@_fixed_layout are permitted to reference non-public symbols,
they cannot be serialized and must instead have public
linkage. This negates most of the benefit of inlining the
constructor in the first place, but oh well.
This does not affect resilient builds.
Fixes <rdar://problem/38439363>.
Always give stored property initializers the linkage of the type
that contains them, even if the property is less visible than the
type.
This fixes the case where a type defines a private property, and an
extension in a different file from the same module defines a
constructor.
Fixes <rdar://problem/32743703>.
If the initializer is in a different file than the original
type, and the original type contains a stored property that
has both an initializer *and* a declared type, then the
initializer expression will not have been type checked.
So we must look at the type of pattern, which should still
be correct.
Fixes <https://bugs.swift.org/browse/SR-3942> and
<rdar://problem/25705157>.