mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
13 lines
445 B
Swift
13 lines
445 B
Swift
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
//
|
|
// RUN: echo "public var dummyVar = Int()" | %target-swift-frontend -module-name DummyModule -emit-module -o %t -
|
|
// RUN: %target-swift-frontend -typecheck -verify -I %t %s
|
|
|
|
// REQUIRES: can_import
|
|
|
|
#if canImport(DummyModule)
|
|
print(DummyModule.dummyVar) // expected-error {{use of unresolved identifier 'DummyModule'}}
|
|
print(dummyVar) // expected-error {{use of unresolved identifier 'dummyVar'}}
|
|
#endif
|