Files
swift-mirror/test/ParseableInterface/ModuleCache/WrongName.swiftinterface
Jordan Rose a51f1dd3d2 [ParseableInterface] Pass down the module name and import source loc
- Use the name for the cached module, so that we don't end up with a
  zillion "x86_64-XXXXXXXX.swiftmodule" files in the cache when we're
  working with architecture-specific swiftmodules.

- Diagnose if the expected name is different from the name specified
  in the swiftinterface.

- Emit all diagnostics at the location of the import, instead of
  without any location at all.
2018-12-06 13:33:07 -08:00

8 lines
361 B
Plaintext

// swift-interface-format-version: 1.0
// swift-module-flags: -module-name DreadPirateRoberts
// RUN: %empty-directory(%t)
// RUN: echo 'import WrongName' | not %target-swift-frontend -typecheck -enable-parseable-module-interface -module-cache-path %t -I %S - 2>&1 | %FileCheck %s
// CHECK: :1:8: error: cannot load module 'DreadPirateRoberts' as 'WrongName'