Skip to content

Commit

Permalink
Clarify extension member resolution (#4116)
Browse files Browse the repository at this point in the history
Clarify extension member resolution: The applicability of a given extension for an invocation of an extension instance member `m` would require that the static type of the syntactic receiver does not have 'a member whose basename is the basename of `m`'. This PR makes it explicit that this is 'an instance member whose basename is the basename of `m`', and it isn't relevant if the declaration that induced said type has a static member with such a name.
  • Loading branch information
eernstg authored Oct 2, 2024
1 parent 3503e49 commit 8c4aa8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
% version of the language which will actually be specified by the next stable
% release of this document.
%
% Sep 2024
% - Clarify the extension applicability rule to explicitly state that it
% is concerned with an instance member with the same basename, not a
% static member.
%
% Jun 2024
% - Add missing references to section 'Type dynamic' at the points where the
% static analysis of Object member invocations is specified.
Expand Down Expand Up @@ -6661,7 +6666,7 @@ \subsubsection{Applicability of an Extension}
because they do not have a type.%
}
\item
The type $S$ does not have a member with the basename $m$,
The type $S$ does not have an instance member with the basename $m$,
and $S$ is neither \DYNAMIC{} nor \code{Never}.

\commentary{%
Expand Down

0 comments on commit 8c4aa8a

Please sign in to comment.