Files
swift-mirror/validation-test/Sema/SwiftUI/rdar57201781.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

27 lines
604 B
Swift

// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -target %target-cpu-apple-macosx10.15 -swift-version 5
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// https://github.com/swiftlang/swift/issues/79255
import SwiftUI
struct ContentView : View {
@State var foo: [String] = Array(repeating: "", count: 5)
var body: some View {
VStack {
HStack {
Text("")
TextFi // expected-error {{cannot find 'TextFi' in scope}}
}
ForEach(0 ... 4, id: \.self) { i in
HStack {
TextField("", text: self.$foo[i])
}
}
}
}
}