Skip to content

Commit 2d1bbeb

Browse files
committed
Added some extra commentary text at locations where the main text seemed to need it
1 parent ffed877 commit 2d1bbeb

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

specification/dartLangSpec.tex

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5230,7 +5230,11 @@ \subsubsection{Inheritance and Overriding}
52305230
\commentary{%
52315231
Note that an interface can inherit members that are inaccessible
52325232
(because they are private to a different library),
5233-
but it can only override members that are accessible.%
5233+
but it can only override members that are accessible.
5234+
This is the reason why it is called ``with respect to $K$''
5235+
when the topic is inheritance,
5236+
but no library is mentioned when the topic is overriding:
5237+
only one library is relevant, namely the one that declares $C$.%
52345238
}
52355239

52365240
\LMHash{}%
@@ -5240,12 +5244,15 @@ \subsubsection{Inheritance and Overriding}
52405244
or $I$ overrides $m$.
52415245

52425246
\LMHash{}%
5243-
\BlindDefineSymbol{I, K, n, m}%
5244-
Let $I$ be an interface, $K$ a library, and
5245-
$n$ a name such that a member $m$ with the name $n$
5247+
\BlindDefineSymbol{I, C, K, n, m}%
5248+
Let $I$ be the interface of the class $C$ declared by the library $L$,
5249+
$K$ a library
5250+
(\commentary{which may or may not be the same as $L$}),
5251+
and $n$ a name such that a member $m$ with the name $n$
52465252
is inherited by $I$ with respect to $K$.
52475253
\commentary{%
5248-
Note that there may be more than one such member.%
5254+
Note that there may be more than one such member,
5255+
and also that $C$ does not override $m$.%
52495256
}
52505257
The
52515258
\IndexCustom{member signature}{interface!member signature}
@@ -5257,6 +5264,21 @@ \subsubsection{Inheritance and Overriding}
52575264
\IndexCustom{member signature conflict}{interface!member signature conflict}
52585265
with respect to $n$ and $K$.
52595266

5267+
\commentary{%
5268+
When $n$ is a public name, $K$ can be $L$
5269+
or any other library where $C$ is in scope.
5270+
In other words, $K$ does not matter.
5271+
But when $n$ is a private name then
5272+
$K$ must be the library that declares $m$,
5273+
such that $m$ is accessible to $K$.
5274+
This covers the case where the interface $I$
5275+
(as well as the underlying class $C$) has
5276+
a member signature conflict on
5277+
a member which is private to another library.
5278+
This can be a compile-time error
5279+
(\ref{classes}).%
5280+
}
5281+
52605282

52615283
\subsubsection{Correct Member Overrides}
52625284
\LMLabel{correctMemberOverrides}

0 commit comments

Comments
 (0)