Slava Pestov
bc7044e944
Sema: Update diagnostics for openType() change
...
Some of these are minor regressions; they will be fixed on main but
not release/5.10.
2024-01-09 15:23:42 -05:00
Holly Borla
e42667bde6
[Diagnostics] Suppress printing explicit pack types in the ASTPrinter instead of
...
stripping PackType out of diagnostic arguments.
There are places in the type printing code that assume the substitution for a
type parameter pack is always a pack, and violating that invariant will crash
the compiler. We also never want to print 'Pack{...}' in diagnostics anyway,
so the print option is a better approach and fixes a few existing tests that still
contained 'Pack{...}' in error messages.
2023-06-14 11:57:18 -07:00
Slava Pestov
1957bd6065
Sema: Reword diagnostics to say 'without a type annotation' instead of 'without more context'
2023-06-09 17:44:42 -04:00
Pavel Yaskevich
03f88a0041
[CSSimplify] Add tailored diagnostics for same-shape mismatches related to arguments
...
Suggest to drop tuples, synthesized or remove extraneous arguments
based on pack shape mismatches.
2023-05-02 09:32:19 -07:00
Pavel Yaskevich
bbe305cd43
[ConstraintSystem] Add same-shape constraint
...
The constraint takes two pack types and makes sure that their
reduced shapes are equal. This helps with diagnostics because
constraint has access to the original pack expansion pattern
types.
2023-05-02 09:32:19 -07:00
Slava Pestov
df5d531dc6
ASTPrinter: Fix printing of pack requirements
...
Also remove the flag for printing 'each' and make it always on.
2023-04-19 13:04:51 -04:00
Holly Borla
e48a9b5aeb
[NFC] Remove the VariadicGenerics flag from tests that don't use generic types
...
with parameter packs.
2023-04-15 17:48:08 -07:00
Holly Borla
234b5dc660
[SE-0393] Require the repeat keyword for generic requirement expansions.
2023-04-12 22:04:01 -07:00
Sophia Poirier
70cffb06f3
[Variadic Generics] type parameter pack syntax change: T... -> each T
2023-03-02 14:42:28 -08:00
Sophia Poirier
e8361dd8cd
[Variadic Generics] fix tests incorrect pack expansion syntax in some tests, but also disable them due to triggering a constraints checker assertion
2023-01-27 16:50:40 -08:00
Holly Borla
c363fa2510
[Diagnostics] Make same-shape requirement failure diagnostics less sensitive
...
to binding order.
2023-01-07 09:50:14 -08:00
Holly Borla
6725f365ba
[Variadic Generics] Update tests for syntax changes.
2023-01-07 09:50:14 -08:00
Holly Borla
89fa17d74c
[Parser] Replace postfix ellipsis with a prefix 'repeat' keyword for pack
...
expansion expressions, and create them in the parser instead of during
pre-checking in the constraint system.
2023-01-07 09:49:14 -08:00
Holly Borla
42020792c6
[Sema] Represent pack element references in pack expansion patterns as
...
PackElementExpr.
2022-12-14 20:45:52 -08:00
Holly Borla
c1dcb9c6f1
[FrontendOptions] Remove bespoke experimental feature flags for ImplicitSome and
...
VariadicGenerics in favor of -enable-experimental-feature X.
2022-11-11 10:14:08 -08:00
Slava Pestov
3adb1dd1d0
Sema: Remove OpenParameterPackElements
2022-10-27 17:00:22 -04:00
Slava Pestov
2dd6d24834
Sema: Tweak PackMatchers to preserve PackExpansionType on both sides
2022-10-27 13:46:58 -04:00
Slava Pestov
bb045423b3
Sema: Add diagnostics for ShapeOf constraint
2022-10-25 13:20:38 -04:00
Slava Pestov
731d903a43
Sema: Add ConstraintKind::ShapeOf
2022-10-25 12:55:04 -04:00
Slava Pestov
c34f8d3a0b
Sema: Check AnyObject requirements of variadic generic functions
2022-10-22 01:17:13 -04:00
Slava Pestov
f3fcc44d17
Sema: Handle PackElement locator in repairFailures()
2022-10-21 22:17:38 -04:00
Slava Pestov
7d0de80bfc
Sema: Check requirements when calling a variadic generic function
2022-10-21 22:17:38 -04:00