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/decl/enum/enumtest.swift
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -441,4 +441,21 @@ class C {}
441
441
protocolP{}
442
442
443
443
enumE:C&P{}
444
-
// expected-error@-1 {{inheritance from class-constrained protocol composition type 'C & P'}}
444
+
// expected-error@-1 {{inheritance from class-constrained protocol composition type 'C & P'}}
445
+
446
+
// SR-11522
447
+
448
+
enumEnumWithStaticNone1{
449
+
case a
450
+
staticletnone=1
451
+
}
452
+
453
+
enumEnumWithStaticNone2{
454
+
case a
455
+
staticletnone=EnumWithStaticNone2.a
456
+
}
457
+
458
+
let _:EnumWithStaticNone1?=.none // Okay
459
+
let _:EnumWithStaticNone2?=.none // expected-warning {{assuming you mean 'Optional<EnumWithStaticNone2>.none'; did you mean 'EnumWithStaticNone2.none' instead?}}
460
+
// expected-note@-1 {{explicitly specify 'Optional' to silence this warning}}{{31-31=Optional}}
0 commit comments