Files
swift-mirror/test/IDE/enable_objc_interop.swift
Jordan Rose d05073adbe swift-ide-test: Correctly infer -enable-objc-interop from a target (#13853)
Note that this /still/ isn't correct when there /isn't/ an explicit
target, because LangOptions doesn't set up platform conditions when no
target is explicitly set. But it's a step forward.
2018-01-10 14:27:15 -08:00

17 lines
482 B
Swift

// RUN: %target-swift-ide-test -source-filename %s -annotate 2>&1 >/dev/null | %FileCheck %s -check-prefix=CHECK-%target-runtime
#if _runtime(_ObjC)
foo
// CHECK-objc: unresolved identifier 'foo'
// CHECK-objc-NOT: unresolved identifier 'bar'
// CHECK-objc-NOT: unresolved identifier 'baz'
#elseif _runtime(_Native)
bar
// CHECK-native-NOT: unresolved identifier 'foo'
// CHECK-native: unresolved identifier 'bar'
// CHECK-native-NOT: unresolved identifier 'baz'
#else
baz
#endif