Commit Graph

12 Commits

Author SHA1 Message Date
Pavel Yaskevich
7c91107742 [AST] PackMatcher/NFC: Expand a comment to explain why per-index match is okay in some cases 2023-05-24 09:55:35 -07:00
Pavel Yaskevich
1e03cdc102 [AST] PackMacher: Match pack expansion elements pair-wise if pack arity matches
This covers situations like `Pack{repeat each T1, repeat each T2}`
vs. `Pack{repeat $T1, repeat $T2}` where type variables are allowed
to bind to packs.

Resolves: rdar://109539394
2023-05-22 14:20:31 -07:00
Pavel Yaskevich
5c2f77c5dc [AST] PackMatching: Make pack expansion type check pluggable
The constraint solver would supply its own version of the function
that can check for pack expansion type variables as well.
2023-05-02 09:31:56 -07:00
Pavel Yaskevich
b027691b69 [AST] PackExpansionMatcher/NFC: Rename {lhs, rhs}Params to {lhs, rhs}Elts 2023-03-24 11:02:05 -07:00
Pavel Yaskevich
2ea3014ae9 [AST] PackExpansionMatcher/NFC: Templatarize TypeListPackMatcher 2023-03-24 10:58:49 -07:00
Pavel Yaskevich
433cbfcd62 [AST] PackExpansionMatcher: use common prefix/suffix algorithm for tuple matching 2023-03-23 15:07:28 -07:00
Pavel Yaskevich
ee1f16f754 [AST] NFC: Unify implementation for pack expansion matching for type lists 2023-03-23 15:07:28 -07:00
Slava Pestov
b122977671 AST: Record both LHS and RHS index in PackExpansionMatcher.cpp 2022-12-01 15:25:20 -05:00
Slava Pestov
914e0c490c AST: Small cleanup for PackExpansionMatcher 2022-11-29 22:15:55 -05:00
Slava Pestov
cbce4a52ca Sema: Support PackExpansionTypes in matchPackTypes() 2022-10-21 22:17:38 -04:00
Slava Pestov
a000b78eac AST: Introduce ParamPackMatcher, for structural matching of function types 2022-10-16 21:37:25 -04:00
Slava Pestov
9d16b821a8 AST: Move Sema's TuplePackMatcher to AST
I'm also going to use it in TypeMatcher, for the Requirement Machine's
same-type requirement desugaring.
2022-10-16 21:37:25 -04:00