Commit Graph

10 Commits

Author SHA1 Message Date
Owen Voorhees
9708247065 [SE-0284] Lift the 1-vararg-per-function restriction
[SE-0284] Add round_trip_parse_gen tests

[SE-0284] Add missing test cases
2020-08-23 21:37:07 -07:00
Doug Gregor
2395225df7 [Type checker] Improve diagnostics for trailing closures.
The change to the forward-scanning rule regressed some diagnostics,
because we no longer generated the special "trailing closure mismatch"
diagnostic. Reinstate the special-case "trailing closure mismatch"
diagnostic, but this time do so as part of the normal argument
mismatch diagnostics so it is based on type information.

While here, clean up the handling of missing-argument diagnostics to
deal with (multiple) trailing closures properly, so that we can (e.g)
suggest adding a new labeled trailing closure at the end, rather than
producing nonsensical Fix-Its.

And, note that SR-12291 is broken (again) by the forward-scan matching
rules.
2020-07-24 08:10:54 -07:00
Luciano Almeida
12c8630f7f [tests] Adding regression tests for SR-13240 2020-07-23 20:04:55 -03:00
Pavel Yaskevich
739ba4bb39 [CSBindings] Open collection binding associated with @autoclosure argument
To preserve subtype relationship between element types of a collection
passed as an argument to a parameter represented by another collection
type let's extend opening of the collection types to be done for arguments
to @autoclosure parameters as well because implicit closure is transparent
to the caller.

Resolves: [SR-13135](https://bugs.swift.org/browse/SR-13135)
Resolves: rdar://problem/65088975
2020-07-06 11:54:39 -07:00
Pavel Yaskevich
c0840fdcd3 [TypeChecker] NFC: Restore test-cases removed by incorrect merge 2020-06-12 15:07:32 -07:00
Pavel Yaskevich
d9594c712a [TypeChecker] NFC: Adjust tests improved by new approach for ambiguity diagnosis 2020-06-12 11:47:03 -07:00
omochimetaru
21c9996a1f [ConstraintSystem][NFC] add test cases for argument matching 2020-05-30 22:58:45 +09:00
omochimetaru
8339e8ccd0 [ConstraintSystem][NFC] add tests for label matching diagnostics
It bakes current behavior for reviewing changes in future.
2020-05-24 06:54:07 +09:00
omochimetaru
339f179731 [ConstraintSystem][NFC] Move test cases about argument matching ...
from `diagnostics.swift` to `argument_matching.swift` which has
more specific interest.
2020-05-23 06:15:13 +09:00
omochimetaru
a6d97ecade [ConstraintSystem][NFC] rename keyword_arguments.swift to ...
`argument_matching.swift` in test.

New filename indicates that is also contains a test case for
matching of unlabeled arguments.
2020-05-23 05:40:36 +09:00