mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
31 lines
768 B
Swift
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:
|