SwiftQuiz
#6

Existential Self Requirement

  • existentials
  • protocols
Swift 6.3.2 Report an issue

Verified quizzes have their expected answer checked by compiling and running the code with the listed Swift toolchain during the site build.

let a: any Equatable = 1
let b: any Equatable = 1

print(a == b)
Hint

What does Self mean inside the extension, and what would it have to mean for a == b to be type-checked?

Your answer

What does this program do?