mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
(And unions, and enums. Now with a fix for forward declarations.) This isn't common, but we shouldn't break when it happens. rdar://problem/22570681 Swift SVN r31692
22 lines
783 B
Swift
22 lines
783 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -verify -I %S/Inputs/custom-modules %s
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -verify -I %S/Inputs/custom-modules -DREVERSED %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
// Do not import Foundation! This tests indirect visibility.
|
|
#if REVERSED
|
|
import Redeclaration
|
|
import AppKit
|
|
#else
|
|
import AppKit
|
|
import Redeclaration
|
|
#endif
|
|
|
|
let encoding: UInt = NSUTF8StringEncoding
|
|
|
|
let viaTypedef: Redeclaration.NSPoint = AppKit.NSPoint(x: 0, y: 0)
|
|
Redeclaration.NSStringToNSString(AppKit.NSStringToNSString("abc"))
|
|
|
|
let viaStruct: Redeclaration.FooStruct1 = AppKit.FooStruct1()
|
|
let forwardDecl: Redeclaration.Tribool = AppKit.Tribool() // expected-error {{no type named 'Tribool' in module 'Redeclaration'}}
|