Files
swift-mirror/test/FixCode/fixits-apply-objc.swift.result
Doug Gregor 6a8d3211aa [Type checker] Move ad-hoc isObjC/isDynamic checking to finalization.
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.
2018-07-25 20:55:13 -07:00

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
}