Skip to content

Commit 9aa7463

Browse files
authored
Merge pull request #75054 from hunhee98/fix-typo
Fix typo in class-inheritance.tex
2 parents 591891f + 46fbbb6 commit 9aa7463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Generics/chapters/class-inheritance.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
\item The witness must be in a protocol extension. If the witness is a method on the class, there is no way to observe the concrete substitution for the protocol \texttt{Self} type, because it is not a generic parameter of the class method.
453453
\item (The hack) The interface type of the protocol requirement must not mention any associated types.
454454
\end{enumerate}
455-
The determination of whether to use a static or covariant \texttt{Self} type for a class conformance is implemented by the type cheker function \texttt{matchWitness()}.
455+
The determination of whether to use a static or covariant \texttt{Self} type for a class conformance is implemented by the type checker function \texttt{matchWitness()}.
456456

457457
Indeed, Condition~3 is a hack; it opens up an exception where the soundness hole we worked so hard to close is once again allowed. In an ideal world, Conditions 1~and~2 would be sufficient, but by the time the soundness hole was discovered and closed, existing code had already been written taking advantage of it. The scenario necessitating Condition~3 is when the default implementation appears in a \emph{constrained} protocol extension:
458458
\begin{Verbatim}

0 commit comments

Comments
 (0)