Skip to content

Commit b362e3f

Browse files
committed
Add a test case ensuring that we diagnose throws(any Codable & Error).
1 parent e4793cb commit b362e3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/decl/func/typed_throws.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ struct HasASubscript {
123123
}
124124
}
125125
}
126+
127+
// expected-error@+1{{thrown type 'any Codable & Error' (aka 'any Decodable & Encodable & Error') does not conform to the 'Error' protocol}}
128+
func throwCodableErrors() throws(any Codable & Error) { }

0 commit comments

Comments
 (0)