Files
swift-mirror/test/FixCode/fixits-apply-objc.swift
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
537 B
Swift

// 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
let a2 : AnyObject?
a2 = an
let a3 : AnyObject!
a3 = an
}
func foo1(_ an : Any) {
let obj: AnyObject = an
}
func foo2(_ messageData: Any?) -> AnyObject? {
return messageData
}