Closed nathawes closed 5 years ago
@swift-ci create
Reproduced without code-completion:
private struct Collector {
init() {}
func appending(_ result: Int) -> Collector {
return self
}
}
func testing(ary: [String]) {
let result1 = ary
.compactMap { _ in
result2.foo
}
.reduce(Collector()) { collector, result in collector.appending(result) }
let result2 = result1.foobar
}
Probably, `result1` and `result2` are cross referencing.
I incorrectly duped this to the other radar. It's a different issue.
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | CodeCompletion | |Labels | Bug, CompilerCrash | |Assignee | None | |Priority | Medium | md5: d0a4cce3ff8d444b486ed453327006cfduplicates:
Issue Description:
To reproduce:
Then in Xcode:
Select the October 3 dev snapshot toolchain
Navigate to AggregatedStructGenerator.swift
Replace its contents with attached "AggregatedStructGenerator-modified.swift" file
Invoke code completion immediately before the "=" in "if let internalStruct = result.internalStruct" on line 19 of the modified file to get the trace below: