File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -510,7 +510,10 @@ let _: GenericEnumWithStaticNone<Int>? = .none // expected-warning {{assuming yo
510
510
// expected-note@-1 {{explicitly specify 'Optional' to silence this warning}}{{42-42=Optional}}
511
511
// expected-note@-2 {{use 'GenericEnumWithStaticNone<Int>.none' instead}}{{42-42=GenericEnumWithStaticNone<Int>}}
512
512
let _: GenericEnumWithStaticNone < String > ? = . none // Okay
513
- let _: GenericEnumWithStaticNone ? = . none // FIXME(SR-11535): This should be diagnosed
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
517
515
518
enum GenericEnumWithoutNone < T> {
516
519
case a
You can’t perform that action at this time.
0 commit comments