Files
swift-mirror/validation-test/IDE/issues_fixed/issue-57149.swift
Alex Hoppen 423826f742 [CodeComplete] Add test case for #57148, #57149
The issue no longer occurs on `main`. Add a test case for it.

Fixes #57148
Fixes #57149
2023-11-23 18:01:03 -08:00

31 lines
768 B
Swift

// RUN: %batch-code-completion
protocol View {}
extension Never: View {}
@resultBuilder struct ViewBuilder {
static func buildBlock() -> Never { fatalError() }
static func buildBlock<Content>(_ content: Content) -> Content where Content : View { fatalError() }
}
struct AsyncImage<Content> : View where Content : View {
init(@ViewBuilder content: @escaping (Image) -> Content) { fatalError() }
}
struct Image: View {}
extension View {
func bspectRatio(foo: Int) -> Never { fatalError() }
}
struct ContentView: View {
var body: some View {
AsyncImage() { image in
image.bspectRatio(#^COMPLETE^#foo: 1)
}
}
}
// COMPLETE: Decl[InstanceMethod]/Super/Flair[ArgLabels]/TypeRelation[Convertible]: ['(']{#foo: Int#}[')'][#Never#]; name=foo: