Skip to content

Commit 65219d5

Browse files
committed
Correct rule about interfaces of bounded types
1 parent bd59ddf commit 65219d5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

specification/dartLangSpec.tex

+6-4
Original file line numberDiff line numberDiff line change
@@ -5529,9 +5529,9 @@ \section{Interfaces}
55295529
(\ref{propertyExtraction}),
55305530
any type $T$ which is $T_0$ bounded
55315531
(\ref{typesBoundedByTypes}),
5532-
where $T_0$ is a class with interface $I$,
5532+
where $T_0$ is a type with interface $I$,
55335533
is also considered to have interface $I$.
5534-
Similarly, when $T$ is $T_0$ bounded where $T_0$ is a function type,
5534+
In particular, when $T$ is $T_0$ bounded where $T_0$ is a function type,
55355535
$T$ is considered to have a method named \CALL{} with signature $m$,
55365536
such that the function type of $m$ is $T_0$.
55375537

@@ -23273,8 +23273,10 @@ \subsection{Type Nullability}
2327323273
For example, even though \code{$e_1$.isEven} is allowed
2327423274
when the type of $e_1$ is \code{int},
2327523275
\code{$e_2$.isEven} is a compile-time error
23276-
when the type of $e_2$ is \code{int?}\ or
23277-
a type variable $X$ whose bound is \code{int?}.%
23276+
when the type of $e_2$ is \code{int?}.
23277+
It is also an error for a type variable $X$ whose bound is \code{int?},
23278+
because they have the same interface
23279+
(\ref{interfaces}).%
2327823280
}
2327923281

2328023282

0 commit comments

Comments
 (0)