diff --git a/unified/extractor/tests/corpus/swift/control-flow/switch-case-item-where-clauses.swift b/unified/extractor/tests/corpus/swift/control-flow/switch-case-item-where-clauses.swift new file mode 100644 index 00000000000..50003cb1fbc --- /dev/null +++ b/unified/extractor/tests/corpus/swift/control-flow/switch-case-item-where-clauses.swift @@ -0,0 +1,8 @@ +switch n { +case let x where x > 0: + print("positive") +case let y where y < 0, 0: + print("non-positive") +default: + print("other") +} diff --git a/unified/extractor/tests/corpus/swift/optionals-and-errors/catch-where-clauses.swift b/unified/extractor/tests/corpus/swift/optionals-and-errors/catch-where-clauses.swift new file mode 100644 index 00000000000..48995b818e5 --- /dev/null +++ b/unified/extractor/tests/corpus/swift/optionals-and-errors/catch-where-clauses.swift @@ -0,0 +1,7 @@ +do { + try foo() +} catch let e where isNetworkError(e), let f where isTimeout(f) { + print("retry") +} catch { + print("fallback") +}