Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
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.
2024-11-02 11:46:46 -07:00
Allan Shortlidge
dea6dfd6dd AST: Expand @_transparent in SemanticDeclAttrsRequest.
Resolves rdar://117780430
2023-11-01 15:55:19 -07:00
Joe Groff
b4f536927a Disable destructuring initializations in struct let stored properties.
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.
2023-10-03 13:24:39 -07:00
Allan Shortlidge
747f286b8d ModuleInterface: Adopt new swiftinterface verification lit substitutions pervasively in tests where they can be adopted by simply updating or adding a few RUN: lines. 2022-04-15 20:13:00 -07:00
Slava Pestov
4ff6cda180 Add module interface printing test with non-trivial pattern binding initializer
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.
2020-09-22 13:54:42 -04:00
Harlan Haskins
22bab7c5f7 [ModuleInterface] Fix indentation for private(set) vars
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)
2019-11-21 13:56:07 -08:00
Harlan Haskins
d3b8ce7ae2 [test] Update ParseableInterface to ModuleInterface
Also remove uses of -emit-parseable-module-interface from tests
2019-09-13 14:55:48 -07:00