Files
swift-mirror/test/CrossImport/transitive.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

28 lines
991 B
Swift

// This file tests that re-exports can load a cross-import overlay.
// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/lib-templates/* %t/
// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDIRECT_FIRST
// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -enable-cross-import-overlays -I %t/include -I %t/lib/swift -F %t/Frameworks -DDIRECT_SECOND
#if DIRECT_FIRST
import ThinLibrary
import UniversalExports
#elseif DIRECT_SECOND
import UniversalExports
import ThinLibrary
#endif
// We should have loaded the underlying clang module.
fromUniversalExportsClang() // no-error
// We should have loaded core_mi6 too.
fromCoreMI6() // no-error
// We should have loaded _AlwaysImportedOverlay.
fromAlwaysImportedOverlay() // no-error
// We should *not* have loaded _NeverImportedOverlay
fromNeverImportedOverlay() // expected-error {{cannot find 'fromNeverImportedOverlay' in scope}}