Skip to content

Commit

Permalink
Adjust wording about extension vs. static method conflicts (#2207)
Browse files Browse the repository at this point in the history
The section about extensions in the language specification had an imprecise wording about conflicts involving an extension member (static or not) and a member of the class `Object`. This PR clarifies the text: Such conflicts only arise when the member of `Object` is an instance member.
  • Loading branch information
eernstg authored Apr 30, 2022
1 parent 4340e79 commit 70eb85c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
% - Adjust and clarify simple string interpolation (to allow `'$this'`, which
% is already implemented and useful).
% - Add several lexical rules about identifiers, clarifying different kinds.
% - Clarify the conflicts between extension members and `Object` instance
% members.
%
% 2.14
% - Add constraint on type of parameter which is covariant-by-declaration in
Expand Down Expand Up @@ -5837,8 +5839,13 @@ \section{Extensions}
\item $D$ declares a type parameter named \code{E}.
\item $D$ declares a member whose basename is the name of a type parameter
of $D$.
\item $D$ declares a member (static or not) with the same basename as a
member declared by the built-in class \code{Object}.
\item $D$ declares an instance member or a static member whose basename is
\code{hashCode}, \code{noSuchMethod}, \code{runtimeType}, \code{toString},
or \lit{==}.
\commentary{%
That is, a member whose basename is also the name of
an instance member that every object has.%
}
\item $D$ declares a constructor.
\item $D$ declares an instance variable.
\item $D$ declares an abstract member.
Expand Down

0 comments on commit 70eb85c

Please sign in to comment.