Files
swift-mirror/test/Interpreter/SDK/objc_protocol_lookup.swift
Graham Batty 83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00

40 lines
652 B
Swift

// Check JIT mode
// RUN: %swift -sdk %sdk -interpret %s | FileCheck %s
// REQUIRES: swift_interpreter
// REQUIRES: objc_interop
import Foundation
@objc protocol Fungible: Runcible {
func funge()
}
@objc protocol Runcible {
func runce()
}
class C: Fungible {
@objc func runce() {}
@objc func funge() {}
}
class D {}
extension D: Fungible {
@objc func runce() {}
@objc func funge() {}
}
extension NSString: Fungible {
func runce() {}
func funge() {}
}
func check(x: AnyObject) {
println("\(x is Fungible) \(x is Runcible)")
}
check(NSString()) // CHECK: true true
check(C()) // CHECK: true true
check(D()) // CHECK: true true