Commit Graph

16 Commits

Author SHA1 Message Date
Anthony Latsis
24d1fbb5ac Gardening: Migrate test suite to GH issues: Compatibility 2022-08-13 03:52:07 +03:00
Josh Soref
de431c6a3b spelling: overload (#58581)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-05-04 19:24:17 -07:00
Slava Pestov
0502f3b22e Slim down test/Compatibility/tuple_arguments_4.swift 2019-04-16 22:10:22 -04:00
Slava Pestov
39a22f3d6a AST: Remove ParameterTypeFlags::Escaping
Escapingness is a property of the type of a value, not a property of a function
parameter. Having it as a separate parameter flag just meant one more piece of
state that could get out of sync and cause weird problems.

Instead, always look at the noescape bit in a function type as the canonical
source of truth.

This does mean that '@escaping' is now printed in a few diagnostics where it was
not printed before; we can investigate these as separate issues, but it is
correct to print it there because the function types in question are, in fact,
escaping.

Fixes <https://bugs.swift.org/browse/SR-10256>, <rdar://problem/49522774>.
2019-04-15 00:25:03 -04:00
David Zarzycki
31d8153097 [Sema] QoI: Report all tuple type resolution errors
This improves single pass diagnostics when more than one tuple type
element has problems.
2019-03-11 16:03:17 -04:00
Slava Pestov
6d19f7e0f4 Sema: Fix inconsistent behavior with SE-0110-related compatibility hack
Back when SE-0110 was implemented we decided that passing a function value
taking multiple parameters would be allowed where a function value taking
a single tuple argument was expected.

Due to quirks in the old function type representation, the "splat" in the
other direction sometimes worked too. When we redid the function type
representation we added a simulation of the old quirk for -swift-version 4
mode.

However this simulation was itself problematic because it only worked when
the function value being passed was a non-overloaded declaration reference.

Slightly broaden the hack to the overloaded case, to prevent user
confusion when adding or removing overloads.
2019-02-21 09:57:03 -05:00
Slava Pestov
c5cdd709ba Sema: SE-0110 tuple splatting should not implode argument list with varargs
Fixes <https://bugs.swift.org/browse/SR-9470>.
2018-12-16 01:02:56 -05:00
Slava Pestov
b8ff7f1b31 Sync up tuple_arguments and tuple_arguments_4 tests 2018-12-16 01:02:56 -05:00
Pavel Yaskevich
63b802ca88 [AST/Printing] Don't omit empty labels in special names
This makes diagnostics more verbose and accurate, because
it's possible to distinguish how many parameters there are
based on the message itself.

Also there are multiple diagnostic messages in a format of
`<descriptive-kind> <decl-name> ...` that get printed as
e.g. `subscript 'subscript'` if empty labels are omitted.
2018-09-24 18:36:53 -07:00
Ding Ye
63e1937e44 Make it more comprehensive to warn when redundant access
modifier is used in an extension. In addition, add warnings
for access modifier redundancy on property setters; and
address comments from Jordan Rose.
2018-08-11 21:21:54 +10:00
Ding Ye
f34020bfd4 [Sema] Warn when redundant access-level modifier is added in an extension.
This patch adds warning for redundant access-level modifiers
used in an extension. It also refines the diagnostics of
access_control_ext_member_more issues, in case the fixit
could suggest redundant modifiers.

Resolves: SR-8453.
2018-08-10 14:33:16 +10:00
Matt Diephouse
35592747db Change "enum element" to "enum case" in diagnostics
From the perspective of the compiler implementation, they're elements. But users will think of these as cases—and many diagnostics already refer to these as enum cases.
2018-07-15 16:01:10 -04:00
Pavel Yaskevich
40b305e183 [Diagnostics] Switch to using FunctionType::getParams instead of input type
Convert all of the usages of `FunctionType->getInput()` to use
`Function->getParams()` instead which is a new preferred API.
2018-04-09 22:35:48 -07:00
Mark Lacey
3479806d92 Fix regression from hack for SR-6796.
That hack resulted in already matching argument and parameter to end
up not matching in this case.

Fixes https://bugs.swift.org/browse/SR-7191
and   rdar://problem/38798063
2018-04-03 23:56:22 -07:00
Pavel Yaskevich
c0f5711ee5 [ConstraintSystem] Don't apply types to expressions until solution is found
Resolves: rdar://problem/36744895
2018-02-13 00:08:45 -08:00
Mark Lacey
5a02541894 Fork tuple_arguments test for Swift 5.
Move the existing test into Compatibility/tuple_arguments_4.swift.
Move the Swift 3 test, Compatibility/tuple_arguments.swift, into
Compatibility/tuple_arguments_4.swift.

Add a couple new tests to each file to capture what we do in each
mode.

Overall this doesn't seem like the most satisfying approach for
covering compatibility testing in our standard commit testing, but
it's all we've got at the moment.
2018-02-07 21:40:03 -08:00