Files
swift-mirror/test/stdlib/LazyCollectionPlus.swift
Saleem Abdulrasool b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00

18 lines
467 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -o %t/a.out3 -swift-version 3 && %target-run %t/a.out3
// REQUIRES: executable_test
import StdlibUnittest
var tests = TestSuite("LazyCollectionPlus")
tests.test("NoAmbiguity") {
let d: [String: Int] = ["" : 0]
let xs = d.values.map { $0 }
let ys = d.values.map { $0 + 42 }
let actual = xs + ys // this line should compile without ambiguity
expectEqualSequence([0, 42], actual)
}
runAllTests()