mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
468 B
Swift
14 lines
468 B
Swift
// RUN: %target-parse-verify-swift
|
|
|
|
class Dictionary<K, V> : DictionaryLiteralConvertible { // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'DictionaryLiteralConvertible'}}
|
|
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])
|
|
|