Files
swift-mirror/test/Concurrency/sendable_checking_errors.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

21 lines
611 B
Swift

// RUN: %target-swift-frontend -typecheck -verify -verify-ignore-unrelated -strict-concurrency=complete %s
// Don't test TransferNonSendable because this test will not make
// it past Sema to the SIL pass.
// REQUIRES: concurrency
// rdar://82452688 - make sure sendable checking doesn't fire for a capture
// of a value of error-type
@available(SwiftStdlib 5.1, *)
func f() async {
let n = wobble() // expected-error{{cannot find 'wobble' in scope}}
@Sendable func nested() {
n.pointee += 1
}
}
struct S: Sendable {
var b: Undefined // expected-error{{cannot find type 'Undefined' in scope}}
}