-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.code completionArea → source tooling: code completionArea → source tooling: code completionsource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source tooling
Description
Previous ID | SR-14801 |
Radar | rdar://79555026 |
Original Reporter | @ahoppen |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | CodeCompletion |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: a775b8df2dedca081346ae7d15c9a1d0
Issue Description:
In the following test case when completing foo
, bspectRatio
gets added a second time after the (
.
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE
protocol View2 {}
extension Never: View2 {}
@resultBuilder struct ViewBuilder2 {
static func buildBlock() -> Never { fatalError() }
static func buildBlock<Content>(_ content: Content) -> Content where Content : View2 { fatalError() }
}
struct AsyncImage2<Content> : View2 where Content : View2 {
init(@ViewBuilder2 content: @escaping (Image2) -> Content) { fatalError() }
}
struct Image2: View2 {}
extension View2 {
func bspectRatio(foo: Int) -> Never { fatalError() }
}
struct ContentView: View2 {
var body: some View2 {
AsyncImage2() { image in
image.bspectRatio(#^COMPLETE^#foo: 1)
}
}
}
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.code completionArea → source tooling: code completionArea → source tooling: code completionsource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source tooling