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
switch arg { // expected-warning {{switch covers known cases, but 'UfiPkgEnum' may have additional unknown values}} {{none}} expected-note {{handle unknown values using "@unknown default"}}
52
+
case.one:
53
+
return1
54
+
case.two(let val):
55
+
return2+ val
56
+
}
57
+
}
58
+
59
+
publicfunc h(_ arg:PublicEnum)->Int{
65
60
switch arg { // expected-warning {{switch covers known cases, but 'PublicEnum' may have additional unknown values}} {{none}} expected-note {{handle unknown values using "@unknown default"}}
66
61
case.one:
67
62
return1
@@ -70,7 +65,7 @@ public func g(_ arg: PublicEnum) -> Int {
// Warning still shows up for usableFromInline package enum as the optimization is targeted for
91
+
// decls with package access, not the elevated public access. This might be allowed later.
92
+
func g(_ arg:UfiPkgEnum)->Int{
93
+
switch arg { // expected-warning {{switch covers known cases, but 'UfiPkgEnum' may have additional unknown values}} {{none}} expected-note {{handle unknown values using "@unknown default"}}
94
+
case.one:
95
+
return1
96
+
case.two(let val):
97
+
return2+ val
98
+
}
99
+
}
100
+
95
101
// Warning still shows up for public enum as the optimization is targeted for package types.
96
-
publicfuncg(_ arg:PublicEnum)->Int{
102
+
publicfunch(_ arg:PublicEnum)->Int{
97
103
switch arg { // expected-warning {{switch covers known cases, but 'PublicEnum' may have additional unknown values}} {{none}} expected-note {{handle unknown values using "@unknown default"}}
98
104
case.one:
99
105
return1
@@ -102,7 +108,7 @@ public func g(_ arg: PublicEnum) -> Int {
0 commit comments