Skip to content

Commit 621940e

Browse files
committed
Correct rule about interfaces of bounded types
1 parent 8053ea6 commit 621940e

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
@@ -5573,9 +5573,9 @@ \section{Interfaces}
55735573
(\ref{propertyExtraction}),
55745574
any type $T$ which is $T_0$ bounded
55755575
(\ref{typesBoundedByTypes}),
5576-
where $T_0$ is a class with interface $I$,
5576+
where $T_0$ is a type with interface $I$,
55775577
is also considered to have interface $I$.
5578-
Similarly, when $T$ is $T_0$ bounded where $T_0$ is a function type,
5578+
In particular, when $T$ is $T_0$ bounded where $T_0$ is a function type,
55795579
$T$ is considered to have a method named \CALL{} with signature $m$,
55805580
such that the function type of $m$ is $T_0$.
55815581

@@ -23638,8 +23638,10 @@ \subsection{Type Nullability}
2363823638
For example, even though \code{$e_1$.isEven} is allowed
2363923639
when the type of $e_1$ is \code{int},
2364023640
\code{$e_2$.isEven} is a compile-time error
23641-
when the type of $e_2$ is \code{int?}\ or
23642-
a type variable $X$ whose bound is \code{int?}.%
23641+
when the type of $e_2$ is \code{int?}.
23642+
It is also an error for a type variable $X$ whose bound is \code{int?},
23643+
because they have the same interface
23644+
(\ref{interfaces}).%
2364323645
}
2364423646

2364523647

0 commit comments

Comments
 (0)