Files
swift-mirror/test/Constraints/invalid_stdlib_2.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

14 lines
478 B
Swift

// RUN: %target-typecheck-verify-swift
class Dictionary<K, V> : ExpressibleByDictionaryLiteral { // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'ExpressibleByDictionaryLiteral'}}
typealias Key = K
typealias Value = V
init(dictionaryLiteral xs: (K)...){} // expected-note {{candidate has non-matching type '(dictionaryLiteral: (K)...)'}}
}
func useDict<K, V>(_ d: Dictionary<K,V>) {}
useDict(["Hello" : 1])
useDict(["Hello" : 1, "World" : 2])