Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.
Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).
All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.
There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
This looks like it was never properly implemented, since when we generate the
memberwise initializer for the struct in SILGen, it incorrectly tries to apply
the entire initializer expression to each variable binding in the pattern,
rather than destructuring the result and pattern-matching it to the variables.
Since it never worked it doesn't look like anyone is using this, so let's
put up an error saying it's unsupported until we can implement it properly.
Add `StructLetDestructuring` as an experimental feature flag so that tests around
the feature for things like module interface printing can still work.
A stored property can be part of a pattern binding entry whose pattern
declares multiple bindings with a single initializer, for example:
struct S {
let (x, y) = (0, 0)
}
Make sure these round-trip correctly.
Previously, we would print
```swift
public private(set) var x: Int
```
as
```swift
@_hasStorage public var x: Swift.Int {
get
}
```
which is a) incorrectly indented, and b) shouldn't have newlines in part
of the Generated Interface.
Fixes [SR-9816](https://bugs.swift.org/browse/SR-9816)