Files
swift-mirror/test/Constraints/invalid_stdlib_2.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

14 lines
544 B
Swift

// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated
class Dictionary<K, V> : ExpressibleByDictionaryLiteral { // expected-error {{type 'Dictionary<K, V>' does not conform to protocol 'ExpressibleByDictionaryLiteral'}} expected-note {{add stubs for conformance}}
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])