mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
25 lines
700 B
Swift
25 lines
700 B
Swift
// RUN: %target-swift-frontend -typecheck %s -verify -verify-ignore-unrelated
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Darwin
|
|
import ObjectiveC
|
|
|
|
errno = 0
|
|
assert(errno == 0)
|
|
|
|
fork() // expected-error{{'fork()' is unavailable}} expected-warning {{result of call to 'fork()' is unused}}
|
|
vfork() // expected-error{{'vfork()' is unavailable}} expected-warning {{result of call to 'vfork()' is unused}}
|
|
|
|
|
|
// Test YES and NO.
|
|
let x_YES = YES // expected-error {{'YES' is unavailable: Use 'Bool' value 'true' instead}}
|
|
let x_NO = NO // expected-error {{'NO' is unavailable: Use 'Bool' value 'false' instead}}
|
|
|
|
func test_shadow(_ flag: Bool) -> Bool {
|
|
let YES = true
|
|
let NO = false
|
|
return flag ? YES : NO
|
|
}
|
|
|