mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The type checker was performing local name lookup to find the Array and Dictionary types to use as defaults for array and dictionary literals. Make sure we only look for Swift.Array and Swift.Dictionary. Fixes SR-9611 / rdar://problem/47085684.
9 lines
157 B
Swift
9 lines
157 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// SR-9611: Array type locally interfers with array literals.
|
|
struct Array { }
|
|
|
|
func foo() {
|
|
_ = ["a", "b", "c"]
|
|
}
|