Skip to content

Commit aed32df

Browse files
committed
Correct the incorrect cleam that Null implements Object
1 parent a2bebf3 commit aed32df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

specification/dartLangSpec.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9427,8 +9427,11 @@ \subsection{Null}
94279427
Attempting to instantiate \code{Null} causes a compile-time error.
94289428
It is a compile-time error for a class to extend, mix in or implement
94299429
\code{Null}.
9430-
The \code{Null} class extends the \code{Object} class
9431-
and declares no methods except those also declared by \code{Object}.
9430+
%% Deep weasel talk here: The clean model would be to have a sealed top class
9431+
%% `Any`, with `Null` and `Object` as the immediate subtypes. The only
9432+
%% special rule we would then need would be that `Any <: Object?`.
9433+
The \code{Null} class implements the same member signatures
9434+
as the \code{Object} class.
94329435

94339436
\commentary{%
94349437
The null object has primitive equality

0 commit comments

Comments
 (0)