Files
swift-mirror/test/NameBinding/import-resolution-2.swift
Dmitri Hrybenko 3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00

30 lines
984 B
Swift

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/abcde.swift
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/aeiou.swift
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/asdf.swift
// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/letters.swift
// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -verify
import letters
import aeiou
import struct asdf.A
import struct abcde.A
var uA : A // expected-error {{'A' is ambiguous for type lookup in this context}}
var uB : B = abcde.B()
var uC : C = letters.C(b: uB)
var uD : D = asdf.D()
var uE : E = aeiou.E()
var uF : F = letters.F()
var qA1 : aeiou.A
var qA2 : asdf.A
var qA3 : abcde.A
var uS : S // expected-error {{use of undeclared type 'S'}}
var qS1 : letters.S // expected-error {{no type named 'S' in module 'letters'}}
var qS2 : asdf.S // expected-error {{no type named 'S' in module 'asdf'}}
// but...!
letters.consumeS(letters.myS)