Commit Graph

7 Commits

Author SHA1 Message Date
Slava Pestov
7a16b0275b AST: Allow one-element tuple types to be constructed
These will never appear in the source language, but can arise
after substitution when the original type is a tuple type with
a pack expansion type.

Two examples:
- original type: (Int, T...), substitution T := {}
- original type: (T...), substitution T := {Int}

We need to model these correctly to maintain invariants.

Callers that previously used to rely on TupleType::get()
returning a ParenType now explicitly check for the one-element
case instead.
2022-08-23 11:12:00 -04:00
ematejska
1420b815d5 [Autodiff upstream] Upstream autodiff unittests (#30709)
* Adding @transpose attr deserialization support

* Turning on the transpose serialization test

* Adding the autodiff unittests
2020-03-30 09:14:22 -07:00
Dan Zheng
b826b3cc04 [AST] Fix bug in IndexSubset::findPrevious. (#29675)
Fix incorrect loop decrement in `IndexSubset::findPrevious`
Add unit tests.
2020-02-06 14:24:00 -08:00
Gogul Balakrishnan
68185cf59e Fix memory error in the implementation of IndexSubset. 2019-10-21 23:47:17 -07:00
Rintaro Ishizaki
dfd47a38bb [UnitTests] Temporarily disable IndexSubset testcases while investigating
rdar://problem/56338898
2019-10-18 16:32:33 -07:00
Richard Wei
c55962c97e Fix indentation in tests and remove unrelated tests. 2019-10-11 13:11:08 -07:00
Richard Wei
9765858d31 Rename to 'IndexSubset' and move it to its own file. 2019-10-11 13:07:53 -07:00