Files
swift-mirror/test/Constraints/invalid_stdlib_2.swift
2014-02-14 10:59:46 +00:00

13 lines
461 B
Swift

// RUN: %swift -parse -verify %s
class Dictionary<K, V> : DictionaryLiteralConvertible { // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'DictionaryLiteralConvertible'}}
typealias Key = K
typealias Value = V
func convertFromDictionaryLiteral(xs: (K, V)...) -> Dictionary<K, V> {} // expected-note {{candidate operates on an instance, not a type as required}}
}
func useDict<K, V>(d: Dictionary<K,V>) {}
useDict(["Hello" : 1])