Files
swift-mirror/test/NameBinding/multi-file.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

27 lines
641 B
Swift

// RUN: %target-swift-frontend -parse -parse-as-library -enable-source-import %s %S/Inputs/multi-file-2.swift %S/Inputs/multi-file-3.swift -module-name MultiFile -I %S/Inputs -sdk "" -verify
import ambiguous_left
import tilde_tilde_low_precedence
struct SomeStruct {
var value: Int
}
func test() {
funcOrVar()
var a: Int = funcOrVar // expected-error{{'() -> ()' is not convertible to 'Int'}}
var s = SomeStruct(value: 42) // use the local SomeStruct
var tilde: Bool = 1 + 2 ~~ 3 + 4 // (1 + 2) ~~ (3 + 4)
}
func conformsToItself(inout x: P3, y: P3) {
x = y
}
func testOverrides(obj: Sub) {
obj.foo()
obj.prop = 5
}