Commit Graph

23 Commits

Author SHA1 Message Date
Pavel Yaskevich
c246a7a372 [AST/Sema] Hide using declaration behind DefaultIsolationPerFile experimental feature 2025-05-31 10:49:50 -07:00
Pavel Yaskevich
4b5105df5e [ASTGen] Implement bridging for using declaration 2025-05-30 15:52:09 -07:00
Rintaro Ishizaki
54da89e4a7 [ASTGen] Handle 'read' and 'modify' accessors 2025-03-16 17:41:21 -07:00
Alejandro Alonso
d0513a7aec Merge pull request #79665 from Azoy/value-generics-no-more-experiment
[AST] Make ValueGenerics feature always available
2025-03-10 15:14:34 -07:00
Rintaro Ishizaki
a506bae136 [ASTGen] Generate 'IsExpansionPattern' generic requirements
E.g. `where repeat each T: Comparable`
2025-03-07 10:28:47 -08:00
Alejandro Alonso
c1bb143648 Make ValueGenerics feature always available 2025-02-27 10:03:37 -08:00
Rintaro Ishizaki
f48282c92b [ASTGen] Generate trailing where clause for SubscriptDecl
It was just missing.
2025-02-21 11:36:29 -08:00
Rintaro Ishizaki
8833ff58a2 [AST] Sink the flag collection logic from Parse to AST
* Collect flag in `ParamDecl::setTypeRepr()`.

* [ASTGen] Separate `BridgedParamDecl.setTypeRepr(_:)` from
`BridgedParamDecl.createParsed(_:)` aligning with C++ API. The majority
of the creations don't set the typerepr.

* Update `ParamSpecifierRequest::evaluate` to handle non-implicit
`ParamDecl` without `TypeRepr` (i.e. untyped closure parameter), instead
of `setSpecifier(::Default)` manually in Parse.
2025-02-20 10:04:49 -08:00
Rintaro Ishizaki
43eeb14ba0 [ASTGen] Generate attributes on ParamDecls 2025-02-18 11:14:13 -08:00
Rintaro Ishizaki
6980509f8c [ASTGen] Generate DefaultArgumentInitializer
Rework ParamDecl contextualization.
2025-02-18 11:13:39 -08:00
Rintaro Ishizaki
31efebe896 Merge pull request #79454 from rintaro/astgen-setteraccess
[ASTGen] Fix SetterAccessAttr e.g. private(set)
2025-02-18 07:09:57 -08:00
Rintaro Ishizaki
7dd8944512 [ASTGen] Fix SetterAccessAttr e.g. private(set)
'set' part was not parsed as a keyword. Let's just compare the text.
2025-02-17 22:15:17 -08:00
Rintaro Ishizaki
f172725c36 [ASTGen] Handle reasync and rethrows
Introduce generate(functionSignature:for:)
2025-02-17 22:06:29 -08:00
Rintaro Ishizaki
b7b28b6d8e [ASTGen] Correctly store static spelling and location to PBD 2025-02-17 11:16:53 -08:00
Rintaro Ishizaki
74f5f1de44 [ASTGen] Adopt '-dump-ast-format default-with-decl-contexts' in tests
Verify ASTGen generating DeclContext hierarchy correctly.
2025-02-14 11:17:16 -08:00
Rintaro Ishizaki
f25104ff24 [ASTGen] Generate MagicIdentifierLiteralExpr 2025-02-12 20:47:52 -08:00
Rintaro Ishizaki
0ba92d84e5 [ASTGen] Generate closure signatures
Still TODO:
* Capture list
* Anonymous parameters
2024-11-11 12:21:38 -08:00
Alejandro Alonso
eed695d679 Add some ASTGen tests 2024-11-06 13:56:08 -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
Alejandro Alonso
451e7259a1 Add ValueGenerics experimental feature 2024-09-04 15:13:49 -07:00
Alejandro Alonso
bfffd7e119 Set the param kind in ASTGen 2024-09-04 15:13:47 -07:00
Hamish Knight
088307f24b [test] Update ASTGen tests for single expression returns
These now work because we're doing the transform
in Sema. Closure parameter generation still needs
some extra work unfortunately, so we can't add
tests for that.
2024-01-30 14:08:53 +00:00
Hamish Knight
23ec8f60a8 [test] Split ASTGen tests 2023-12-15 21:46:21 +00:00