Files
swift-mirror/test/NameBinding/import-command-line.swift
Jordan Rose c97c949fcf Add frontend flag -import-module <name>.
This implicitly adds the named module as an import of every source file
in the module being compiled. This is not intended to be used generally,
but will be useful for playgrounds.

rdar://problem/19605934

Swift SVN r24905
2015-02-02 22:20:13 +00:00

10 lines
547 B
Swift

// RUN: %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs -sdk "" -verify
// RUN: %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs -sdk "" -import-module abcde
// RUN: not %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs -sdk "" -import-module 3333 2>&1 | FileCheck -check-prefix=NON-IDENT %s
// NON-IDENT: error: module name "3333" is not a valid identifier
var a: A? // expected-error {{use of undeclared type 'A'}}
var qA: abcde.A? // expected-error {{use of undeclared type 'abcde'}}