Files
swift-mirror/test/Serialization/Recovery/indirect-import-removal.swift
Jordan Rose 4017416d5e [Serialization] Only allow loading modules during import resolution (#21218)
Very early groundwork for private imports. Should not affect anything
today.
2018-12-12 10:50:20 -08:00

17 lines
697 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t -module-name Lib -I %S/Inputs/custom-modules %s
// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules | %FileCheck %s
// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD | %FileCheck -check-prefix CHECK-RECOVERY %s
import IndirectImport
// CHECK: func baseline()
// CHECK-RECOVERY: func baseline()
public func baseline() {}
// CHECK: func test(_: IndirectlyImportedStruct)
// CHECK-RECOVERY-NOT: IndirectlyImportedStruct
public func test(_: IndirectlyImportedStruct) {}