We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 792da10 commit a3340e8Copy full SHA for a3340e8
test/Constraints/enum_cases.swift
@@ -153,3 +153,21 @@ func rdar_49159472() {
153
func baz(e: E) {}
154
}
155
156
+
157
+struct EnumElementPatternFromContextualType<T> {
158
+ enum E {
159
+ case plain
160
+ case payload(T)
161
+ }
162
163
+ func foo(x: Any) where T == EnumElementPatternFromContextualType<Bool>.E {
164
+ switch x {
165
+ case T.plain: // Ok
166
+ break
167
+ case T.payload(true): // Ok
168
169
+ default:
170
171
172
173
+}
0 commit comments