Files
swift-mirror/test/Constraints/array_literal_local_array.swift
Doug Gregor 90a8aaa0d7 [Type checker] Array/dictionary literals define to Swift.(Array|Dictionary)
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.
2019-01-07 10:06:03 -08:00

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"]
}