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/Misc/misc_diagnostics.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ let total = 15.0
26
26
letcount=7
27
27
letmedian= total / count // expected-error {{binary operator '/' cannot be applied to operands of type 'Double' and 'Int'}} expected-note {{overloads for '/' exist with these partially matching parameter lists:}}
28
28
29
-
if(1){} // expected-error{{type 'Int' cannot be used as a boolean; test for '!= 0' instead}}
30
-
if1{} // expected-error {{type 'Int' cannot be used as a boolean; test for '!= 0' instead}}
29
+
if(1){} // expected-error{{integer literal value '1' cannot be used as a boolean; did you mean 'true'?}} {{5-6=true}}
30
+
if1{} // expected-error {{integer literal value '1' cannot be used as a boolean; did you mean 'true'?}} {{4-5=true}}
31
31
32
32
vara:[String]=[1] // expected-error{{cannot convert value of type 'Int' to expected element type 'String'}}
33
33
varb:Int=[1,2,3] // expected-error{{cannot convert value of type '[Int]' to specified type 'Int'}}
0 commit comments