Files
swift-mirror/test/NameBinding/objc_multi_file.swift
Doug Gregor 2edae8c57d Add trivial accessors to static properties (as well as instance properties).
This is a better fix for rdar://problem/19941580: by providing trivial
accessors for all static properties, we have them there for any other
type checking that might need them, including the Objective-C selector
checking from the radar.

Swift SVN r25730
2015-03-04 00:30:46 +00:00

45 lines
1.2 KiB
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -parse-as-library -primary-file %S/Inputs/objc_multi_file_2.swift %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -parse-as-library -primary-file %s %S/Inputs/objc_multi_file_2.swift -verify
// RUN: rm -rf %t && mkdir %t
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module %S/Inputs/objc_multi_file_2.swift -DFAKE_UIIMAGE -o %t
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -module-name main -primary-file %s -I %t -DIMPORT -verify
// REQUIRES: objc_interop
#if IMPORT
import objc_multi_file_2
#endif
import Foundation
class UIImage : NSObject { }
@objc
protocol ImagePresentingView {
var hidden: Bool { @objc(isHidden) get set }
}
// rdar://problem/19794036
class SubA : SuperA {
init() {
super.init(foo: 42)
}
}
class SubSubB : SubB {
// okay: don't conflict with hidden initializers.
init(wibble: String) { super.init(bar: wibble) }
init(foo: String) { super.init(bar: foo) }
}
class SubSubB2 : SubB {
// okay: doesn't conflict with hidden initializer
func initWithWibble(s: String) { }
}
// rdar://problem/19941580
func rdar19941580(foo: Foo) {
var fp: FooProto = foo
}