forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IDE/CodeComplete] Add CallParameterClosureType chunk, which resolves
optional & alias types for closure type parameters. This allows code completion placeholder expansion to properly expand closure parameters utilizing a typealias, e.g. dispatch_block_t. Update and add test for the above. Work for <rdar://problem/15860693>. Swift SVN r20206
- Loading branch information
Showing
6 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE | FileCheck %s | ||
|
||
typealias TestAl = (Int, Int) -> Bool | ||
|
||
class Bar { | ||
func foo1(callback: (Int, Int) -> Void) { | ||
} | ||
func foo2(callback: TestAl) { | ||
} | ||
} | ||
|
||
Bar().#^COMPLETE^# | ||
|
||
|
||
// CHECK: Begin completions, 2 items | ||
// CHECK-DAG: Decl[InstanceMethod]/CurrNominal: foo1({#(callback): (Int, Int) -> Void##(Int, Int) -> Void#})[#Void#] | ||
// CHECK-DAG: Decl[InstanceMethod]/CurrNominal: foo2({#(callback): TestAl##(Int, Int) -> Bool#})[#Void#] | ||
// CHECK: End completions |