Intermediate
Swift
Q80 / 100
What are conditional conformances in Swift?
Correct! Well done.
Incorrect.
The correct answer is B) A conformance that applies only when type constraints are met: extension Array: Equatable where Element: Equatable
B
Correct Answer
A conformance that applies only when type constraints are met: extension Array: Equatable where Element: Equatable
Explanation
extension Optional: Equatable where Wrapped: Equatable means Optional<Int> is Equatable but Optional<UIView> is not. Powerful for composable conformances.
Progress
80/100