Files
swift-mirror/test/IDE/complete_issue-57263.swift
Alex Hoppen 32eff21977 [IDE] Remove "Begin completions" and "End completions" from test cases
These test lines weren't actually providing any value and were annoying to write. Let's jut remove them.
2023-03-22 09:07:17 -07:00

31 lines
769 B
Swift

// RUN: %swift-ide-test -code-completion -code-completion-token COMPLETE -source-filename %s | %FileCheck %s
// https://github.com/apple/swift/issues/57263
struct Foo {
var bar: Int
}
protocol View2 {}
struct EmptyView: View2 {}
@resultBuilder public struct ViewBuilder2 {
public static func buildBlock(_ content: EmptyView) -> EmptyView { fatalError() }
}
public struct List2 {
public init(selection: Int?, @ViewBuilder2 content: () -> EmptyView)
public init(selection: String?, @ViewBuilder2 content: () -> EmptyView)
}
func foo(kp: (Foo) -> String) {}
func foo() {
List2 {
foo(kp: \.self#^COMPLETE^#)
// CHECK: Begin completions, 1 items
// CHECK-NEXT: Decl[InstanceVar]/CurrNominal: .bar[#Int#];
}
.unknownMethod()
}