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
Hamish Knight
34fa48f279 [Sema] Improve wording of a diagnostic
Make it clear the issue is the transfer of
control flow out of the `if`/`switch` expression.
Technically things like `break` and `continue` are
allowed, as long as they are not jumping out of
the expression.
2024-08-14 19:59:05 +01:00
Holly Borla
9ba481ad53 [Diagnostics] Clarify the wording of error_in_future_swift_version. 2024-03-01 12:05:51 -08:00
Hamish Knight
c7ac0aa110 [Sema] Avoid forming nested do expressions in if/switch bindings
In asserts builds this hits an assert that the
feature isn't enabled, and in no-asserts builds
this incorrectly allows `do` expressions to be
used with the feature disabled. Note this only
affects their use when nested in an `if`/`switch`
that is used in a binding, we correctly handled
the other cases.

rdar://121193678
2024-01-18 16:18:49 +00:00
Holly Borla
cc79dea458 [TypeCheckEffects] Downgrade new effects checker errors on if/switch expressions
to warnings until Swift 6.
2024-01-10 12:52:43 -08:00
Holly Borla
9fc7032be8 [TypeCheckEffects] Redundant effects markers on statement expressions should
be a warning.
2024-01-10 11:27:05 -08:00
Hamish Knight
33f94bc874 Introduce do expressions 2023-10-06 11:17:48 +01:00