You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Constraints/dictionary_literal.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,8 @@ var _: MyDictionary<String, Int>? = ["foo", 1] // expected-error {{dictionary o
63
63
var _:MyDictionary<String,Int>?=["foo",1,"bar",42] // expected-error {{dictionary of type 'MyDictionary<String, Int>' cannot be initialized with array literal}}
64
64
// expected-note @-1 {{did you mean to use a dictionary literal instead?}} {{43-44=:}} {{53-54=:}}
65
65
66
-
var _:MyDictionary<String,Int>?=["foo",1.0,2] // expected-error {{cannot convert value of type '[Double]' to specified type 'MyDictionary<String, Int>?'}}
67
-
// expected-error@-1 {{cannot convert value of type 'String' to expected element type 'Double'}}
66
+
var _:MyDictionary<String,Int>?=["foo",1.0,2] // expected-error {{dictionary of type 'MyDictionary<String, Int>' cannot be initialized with array literal}}
67
+
// expected-note@-1 {{did you mean to use a dictionary literal instead?}} {{none}}
68
68
69
69
var _:MyDictionary<String,Int>?=["foo":1.0] // expected-error {{cannot convert value of type 'Double' to expected dictionary value type 'MyDictionary<String, Int>.Value' (aka 'Int')}}
0 commit comments