Fix
This commit is contained in:
parent
032baaacb8
commit
cec613b875
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user