This commit is contained in:
Andreas Stadelmeier 2024-03-27 01:55:19 +01:00
parent 032baaacb8
commit cec613b875

View File

@ -460,7 +460,7 @@ We tried to skip capture conversion and the capture constraints entirely.
But \letfj{}'s type system does not imply a principal typing for methods \cite{principalTypes}.
The problem is that a principal type of a method should have the most general parameter types and the most specific return type.
\begin{lstlisting}[caption=Return type depends on argument types,label=principalTypeExample]
class SpecialPair2<X, Y extends X> extends Pair<X,Y>{}
class SpecialPair<X, Y extends X> extends Pair<X,Y>{}
<X,Y> Pair<X,Y> id(Pair<X,Y> in){