From 5433e94aab25b90f989007372317069a59f0bbbf Mon Sep 17 00:00:00 2001 From: Andreas Stadelmeier Date: Tue, 6 Feb 2024 00:44:48 +0100 Subject: [PATCH] Fixes --- introduction.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/introduction.tex b/introduction.tex index f2e5fa1..0309d6a 100644 --- a/introduction.tex +++ b/introduction.tex @@ -48,8 +48,10 @@ List genList() { \end{figure} -In \cite{WildcardsNeedWitnessProtection} existential types have to be \textit{unpacked} before they can be used. -Our type inference algorithm has to add let statements surrounding method invocations. +Existential types have to be \textit{unpacked} before they can be used \cite{WildcardsNeedWitnessProtection}. +In Java this is done implicitly. +%Our type inference algorithm has to add let statements surrounding method invocations. + \begin{figure}[tp] \begin{subfigure}[t]{0.49\linewidth} \begin{lstlisting}[style=fgj] @@ -139,8 +141,8 @@ it is safe to pass \texttt{"String"} for the first parameter of the function. The constraints representing this code snippet are: \begin{displaymath} - \type{String} \lessdot \wtv{a},\, -\wctype{\wildcard{X}{\type{Object}}{\type{String}}}{List}{\rwildcard{X}} \lessdot \exptype{List}{\wtv{a}} + \type{String} \lessdotCC \wtv{a},\, +\wctype{\wildcard{X}{\type{Object}}{\type{String}}}{List}{\rwildcard{X}} \lessdotCC \exptype{List}{\wtv{a}} \end{displaymath} Here $\sigma(\tv{a}) = \rwildcard{X}$ is a valid solution.