mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Whenever we visit a declaration via the DeclChecker, add it to the list of declarations to finalize. This makes sure that we can centralize the notion of “finalize for SILGen” and that it will be called for everything in the source file being processed.
23 lines
602 B
Plaintext
23 lines
602 B
Plaintext
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-objc-attr-requires-foundation-module -typecheck %s -emit-fixits-path %t.remap -swift-version 3
|
|
// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
|
|
import ObjectiveC
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
func foo(an : Any) {
|
|
let a1 : AnyObject
|
|
a1 = an as AnyObject
|
|
let a2 : AnyObject?
|
|
a2 = an as AnyObject
|
|
let a3 : AnyObject!
|
|
a3 = an as AnyObject
|
|
}
|
|
|
|
func foo1(_ an : Any) {
|
|
let obj: AnyObject = an as AnyObject
|
|
}
|
|
|
|
func foo2(_ messageData: Any?) -> AnyObject? {
|
|
return messageData as AnyObject
|
|
}
|