Files
swift-mirror/test/Interop/Cxx/implementation-only-imports/skip-forward-declarations.swift
2022-05-21 21:28:03 -04:00

16 lines
503 B
Swift

// RUN: %empty-directory(%t)
// RUN: not %target-swiftxx-frontend -emit-module -o %t/FortyTwo.swiftmodule -I %S/Inputs %s 2>&1 | %FileCheck %s
// This test checks that forward declarations are not considered
// when determining the visibility of the decl.
@_implementationOnly import UserA
import UserC
@_inlineable
public func createAWrapper() {
let _ = MagicWrapper()
}
// CHECK: struct 'MagicWrapper' cannot be used in an '@inlinable' function because 'Helper' was imported implementation-only