Skip to content

Commit f560052

Browse files
committed
Correct rule about interfaces of bounded types
1 parent 9fc9818 commit f560052

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

specification/dartLangSpec.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5588,9 +5588,9 @@ \section{Interfaces}
55885588
(\ref{propertyExtraction}),
55895589
any type $T$ which is $T_0$ bounded
55905590
(\ref{typesBoundedByTypes}),
5591-
where $T_0$ is a class with interface $I$,
5591+
where $T_0$ is a type with interface $I$,
55925592
is also considered to have interface $I$.
5593-
Similarly, when $T$ is $T_0$ bounded where $T_0$ is a function type,
5593+
In particular, when $T$ is $T_0$ bounded where $T_0$ is a function type,
55945594
$T$ is considered to have a method named \CALL{} with signature $m$,
55955595
such that the function type of $m$ is $T_0$.
55965596

@@ -23713,8 +23713,10 @@ \subsection{Type Nullability}
2371323713
For example, even though \code{$e_1$.isEven} is allowed
2371423714
when the type of $e_1$ is \code{int},
2371523715
\code{$e_2$.isEven} is a compile-time error
23716-
when the type of $e_2$ is \code{int?}\ or
23717-
a type variable $X$ whose bound is \code{int?}.%
23716+
when the type of $e_2$ is \code{int?}.
23717+
It is also an error for a type variable $X$ whose bound is \code{int?},
23718+
because they have the same interface
23719+
(\ref{interfaces}).%
2371823720
}
2371923721

2372023722

0 commit comments

Comments
 (0)