Skip to content

Commit fba5d54

Browse files
committed
---
yaml --- r: 340799 b: refs/heads/rxwei-patch-1 c: 2872210 h: refs/heads/master i: 340797: 8316c2a 340795: 04f92bf 340791: 4d8283d 340783: a62d797 340767: ed21a6b 340735: 86ac3b2
1 parent 1787bfd commit fba5d54

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: dcabcb36b4189a87ed4924b1669a51ebc86ce283
1018+
refs/heads/rxwei-patch-1: 28722107352981c0472723a5ec26afafcdd7b54c
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/lib/IDE/CodeCompletion.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,9 +1457,8 @@ protocolForLiteralKind(CodeCompletionLiteralKind kind) {
14571457
/// that is of type () -> ().
14581458
static bool hasTrivialTrailingClosure(const FuncDecl *FD,
14591459
AnyFunctionType *funcType) {
1460-
SmallBitVector defaultMap =
1461-
computeDefaultMap(funcType->getParams(), FD,
1462-
/*level*/ FD->isInstanceMember() ? 1 : 0);
1460+
auto defaultMap = computeDefaultMap(funcType->getParams(), FD,
1461+
/*skipCurriedSelf*/ FD->hasCurriedSelf());
14631462

14641463
if (defaultMap.size() - defaultMap.count() == 1) {
14651464
auto param = funcType->getParams().back();

branches/rxwei-patch-1/test/IDE/complete_trailing_closure.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ func test1() {
5656
struct S {
5757
func method1(_: ()->()) {}
5858
static func method2(_: ()->()) {}
59+
static func method3(_ a: Int = 0, _: ()->()) {}
5960
func nonTrivial1(_: (Int)->()) {}
6061
func nonTrivial2(_: @autoclosure ()->()) {}
6162
func test2() {
@@ -81,6 +82,7 @@ func test5() {
8182
}
8283
// STATIC_METHOD_1-NOT: {|}
8384
// STATIC_METHOD_1: Decl[StaticMethod]/CurrNominal: method2 {|}[#Void#]
85+
// STATIC_METHOD_1: Decl[StaticMethod]/CurrNominal: method3 {|}[#Void#]
8486
// STATIC_METHOD_1-NOT: {|}
8587

8688
class C {

0 commit comments

Comments
 (0)