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
myAssertion(e,==,nil) // expected-error {{cannot convert value of type '(any Error)?' to expected argument type '(any Any.Type)?'}}
280
+
myAssertion(e,==,nil) // expected-error {{cannot convert value of type '(any Error)?' to expected argument type '(any (~Copyable & ~Escapable).Type)?'}}
_ =Int.self ==nil // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'nil' always returns false}}
762
-
_ =nil==Int.self // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'nil' always returns false}}
763
-
_ =Int.self !=nil // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'nil' always returns true}}
764
-
_ =nil!=Int.self // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'nil' always returns true}}
765
-
766
-
_ =Int.self ==.none // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'Optional.none' always returns false}}
767
-
_ =.none ==Int.self // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'Optional.none' always returns false}}
768
-
_ =Int.self !=.none // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'Optional.none' always returns true}}
769
-
_ =.none !=Int.self // expected-warning {{comparing non-optional value of type 'any Any.Type' to 'Optional.none' always returns true}}
761
+
_ =Int.self ==nil // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'nil' always returns false}}
762
+
_ =nil==Int.self // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'nil' always returns false}}
763
+
_ =Int.self !=nil // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'nil' always returns true}}
764
+
_ =nil!=Int.self // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'nil' always returns true}}
765
+
766
+
_ =Int.self ==.none // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'Optional.none' always returns false}}
767
+
_ =.none ==Int.self // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'Optional.none' always returns false}}
768
+
_ =Int.self !=.none // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'Optional.none' always returns true}}
769
+
_ =.none !=Int.self // expected-warning {{comparing non-optional value of type 'any (~Copyable & ~Escapable).Type' to 'Optional.none' always returns true}}
770
770
771
771
// <rdar://problem/19032294> Disallow postfix ? when not chaining
772
772
func testOptionalChaining(_ a :Int?, b :Int!, c :Int??){
0 commit comments