// RUN: rm -rf %t && mkdir %t
// RUN: %target-swift-frontend -emit-module -o %t %s -module-name Import
// RUN: %target-swift-frontend -parse -I %t %s -module-name main -DMAIN -verify

// Note: This file is compiled both as a library and as a client of that library. The -verify checks only apply to the client.

import Import

public func test() {
  Import.test()
  Import.hidden() // expected-error {{module 'Import' has no member named 'hidden'}}
}

internal func hidden() {}

// RUN: rm -rf %t && mkdir %t
// RUN: %target-swift-frontend -emit-module -o %t %s -module-name Import
// RUN: %target-swift-frontend -parse -I %t %s -module-name main -DMAIN

// Note: This file is compiled both as a library and as a client of that library.

import Import

public func test() {
  Import.test()
}

--- 
+++ 
@@ -1,11 +1,14 @@
 // RUN: rm -rf %t && mkdir %t
 // RUN: %target-swift-frontend -emit-module -o %t %s -module-name Import
-// RUN: %target-swift-frontend -parse -I %t %s -module-name main -DMAIN
+// RUN: %target-swift-frontend -parse -I %t %s -module-name main -DMAIN -verify
 
-// Note: This file is compiled both as a library and as a client of that library.
+// Note: This file is compiled both as a library and as a client of that library. The -verify checks only apply to the client.
 
 import Import
 
 public func test() {
   Import.test()
+  Import.hidden() // expected-error {{module 'Import' has no member named 'hidden'}}
 }
+
+internal func hidden() {}
[test] Make the test case from r31995 exercise the failure path too.

Swift SVN r32025
