Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Trick
64a48d08e1 Update tests for strict @lifetime type checking 2025-03-19 11:59:04 -07:00
Andrew Trick
0e33dfc8b6 Fix LifetimeDependence feature guard for variable accessors.
Guard variable declarations by `#if $LifetimeDependence` if they have a
~Escapable type. Accessing the declaration implies a lifetime dependence.
2025-01-14 15:41:58 -08:00
Meghana Gupta
e8abd59da5 Update tests 2024-11-18 18:09:19 -08:00
Meghana Gupta
84a0d9c0b2 Remove -disable-experimental-parser-round-trip from @lifetime tests 2024-11-07 14:38:01 -08:00
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
Rintaro Ishizaki
ba485d4630 [Test] Disable experimental parser round-trip in '@lifetime' test cases
Until SwiftParser supports the syntax

rdar://137636751
2024-10-09 23:52:52 -07:00
Meghana Gupta
008431c3b4 Update some dependsOn tests to @lifetime 2024-10-08 15:12:13 -07:00
Kavon Farvardin
0420310623 NCGenerics: it's no longer "experimental"
resolves rdar://127701059
2024-05-08 10:49:12 -07:00
Kavon Farvardin
c8e92fa23e Fix expected NoncopyableGenerics guards 2024-04-22 11:13:40 -07:00
Meghana Gupta
b5ca933002 Update lifetime dependence syntax and inference as per changes in the pitch
Pitch - https://github.com/apple/swift-evolution/pull/2305

Changes highlights:

dependsOn(paramName) and dependsOn(scoped argName) syntax

dependsOn(paramName) -> copy lifetime dependence for all parameters/self except
                         when we have Escapable parameters/self, we assign scope
                         lifetime dependence.

Allow lifetime dependence on parameters without ownership modifier.

Always infer copy lifetime dependence except when we have
Escapable parameters/self, we infer scope lifetime dependence.

Allow lifetime dependence inference on parameters without ownership modifier.
2024-03-23 18:19:47 -07:00
Alex Hoppen
978145c61d [Parser] Remove remaining -disable-experimental-parser-round-trip uses in test cases
All the features in these test cases are now supported by the new parser, so we don’t need the opt-out anymore.

rdar://124646502
2024-03-15 12:30:40 -07:00
Meghana Gupta
a79facf02b Fix ASTPrinting of lifetime dependence
This fixes the errors while compiling functions with lifetime dependence
in the textual interface files.

Also fixes rdar://122573346
2024-02-23 15:35:37 -08:00