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
let _:GenericEnumWithStaticNone<String>?=.none // Okay
513
513
514
-
let _:GenericEnumWithStaticNone?=.none // Okay
515
-
// Base can only be inferred as static member `none` since `Optional.none` overload does not
516
-
// provide a valid solution because the struct's generic argument `T` cannot be infered in this context.
514
+
let _:GenericEnumWithStaticNone?=.none // expected-warning {{assuming you mean 'GenericEnumWithStaticNone<Int>.none'; did you mean 'Optional<GenericEnumWithStaticNone<Int>>.none' instead?}}
let _:GenericStructWithStaticNone<Int>?=.none // expected-warning {{assuming you mean 'Optional<GenericStructWithStaticNone<Int>>.none'; did you mean 'GenericStructWithStaticNone<Int>.none' instead?}}
524
+
// expected-note@-1 {{explicitly specify 'Optional' to silence this warning}}{{44-44=Optional}}
let _:GenericStructWithStaticNone<String>?=.none // Okay
527
+
528
+
let _:GenericStructWithStaticNone?=.none // expected-warning {{assuming you mean 'GenericStructWithStaticNone<Int>.none'; did you mean 'Optional<GenericStructWithStaticNone<Int>>.none' instead?}}
0 commit comments