Files
swift-mirror/test/Interpreter/SDK/misc_osx.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

18 lines
775 B
Swift

// RUN: %target-build-swift -typecheck %s -Xfrontend -verify -Xfrontend -verify-ignore-unrelated
// REQUIRES: executable_test
// REQUIRES: OS=macosx
import CoreServices
func testFSEventStreamRef(stream: FSEventStreamRef) {
// FIXME: These should be distinct types, constructible from one another.
_ = stream as ConstFSEventStreamRef // works by coincidence because both are currently OpaquePointer
_ = ConstFSEventStreamRef(stream) // expected-error {{no exact matches in call to initializer}}
// This is not a CF object.
FSEventStreamRetain(stream) // no-warning
FSEventStreamRelease(stream)
let _: AnyObject = stream // expected-error {{value of type 'FSEventStreamRef' (aka 'OpaquePointer') expected to be instance of class or class-constrained type}}
}