Skip to content

Specify null safety #2605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
9258980
Rebasing
eernstg Oct 7, 2021
d6815f5
Typos: Escaping braces meant to be code
eernstg Oct 8, 2021
60f09dc
Eliminated text about migration features, adapted the remaining text …
eernstg Oct 8, 2021
5e90dea
Rebasing
eernstg Oct 13, 2021
c96644c
Reorganized material on null/Null
eernstg Oct 14, 2021
b9b868e
Rebase
eernstg Oct 18, 2021
3bbb5db
Rebasing
eernstg Oct 27, 2021
1929c47
Rebase
eernstg Nov 1, 2021
9e8be76
WIP
eernstg Nov 9, 2021
93a647c
Corrected last part of section Variables
eernstg Nov 10, 2021
02ca885
Did expression typing, spread element, i2b
eernstg Nov 11, 2021
8e950df
Super-bounded types, least and greatest closure
eernstg Nov 12, 2021
6b69b3b
Assignability, generics
eernstg Nov 12, 2021
c688adb
Extreme types
eernstg Nov 12, 2021
45b4348
Extreme types, helper functions
eernstg Nov 15, 2021
cd20b6e
Rebase
eernstg Nov 16, 2021
a61d3dc
.call insertion on nullable type; clean up BlindDefineSymbol
eernstg Nov 16, 2021
14dda1d
Rebase
eernstg Nov 16, 2021
379d5fb
Main
eernstg Nov 16, 2021
86bf1cd
Type Type
eernstg Nov 17, 2021
0aa5f23
Type Type fixes
eernstg Nov 17, 2021
7f9da6e
More typeType fixes
eernstg Nov 17, 2021
361d314
Constant instances (in particular: about canonical instances)
eernstg Nov 18, 2021
c085085
Corrected variable initialization specification ("has been stored" ra…
eernstg Nov 19, 2021
bf3f7e1
Small adjustments to Variables
eernstg Nov 19, 2021
e4dee92
Rebase
eernstg Nov 26, 2021
96c0edd
Boolean conversion; type test; made true/false terminology consistent…
eernstg Nov 29, 2021
8aa4eb2
Constant types; type variable elimination in constants
eernstg Nov 29, 2021
95c8915
Conditional expression; operators && and ||; `if` statements; delete …
eernstg Nov 30, 2021
88e1f43
Integrate Null Promotion; put v==null rules into Type Promotion, and …
eernstg Dec 1, 2021
3c87375
Null shorting
eernstg Dec 1, 2021
d350bc7
Small fixes in section Null Shorting
eernstg Dec 1, 2021
7e6ce41
Revisiting all occurrences of \NULL/Null/null
eernstg Dec 2, 2021
d4ae201
Did much of Standard ... Bounds
eernstg Dec 3, 2021
78934d5
Standard bounds
eernstg Dec 7, 2021
5dd5fe4
Fixed the "SUB issues" section
eernstg Dec 8, 2021
104bff8
Rebase
eernstg Dec 8, 2021
839ce09
Rebase
eernstg Dec 8, 2021
985c631
Rebase
eernstg Dec 8, 2021
97e015d
Rebase
eernstg Dec 9, 2021
be238dd
Rebase
eernstg Dec 10, 2021
92e60ca
Clarified and corrected Canonical Syntax
eernstg Dec 10, 2021
52ed1be
Fixed subsubsection --> subsection, 2*
eernstg Dec 10, 2021
d14cafc
Typos
eernstg Jan 5, 2022
1f99e16
Whitespace
eernstg Jan 6, 2022
0b5ec9a
Interface type fixes
eernstg Jan 6, 2022
51d7729
Sync with specify_null_safety_new_sections_dec21
eernstg Jan 7, 2022
940dc86
Mark a subtype rule as redundant, in a TODO comment
eernstg Jan 7, 2022
bcfa8d7
Adjust no-loops-in-noSuchMethod example
eernstg Feb 7, 2022
2e81a4e
Adjust no-loops-in-noSuchMethod example
eernstg Feb 8, 2022
271f817
Corrected function type subtype rule (bounds); corrected "math" index…
eernstg May 3, 2022
79b8d25
Adjust class building types
eernstg May 9, 2022
2e5e86e
Adjust examples declaring non-nullable positional optional parameters…
eernstg Jul 26, 2022
68f7e17
Add a TODO to introduce `Any`
eernstg Nov 2, 2022
a736c2e
Correct example in section about super-bounded types
eernstg Nov 3, 2022
8350f89
Correction based on https://github.com/dart-lang/language/issues/2679
eernstg Dec 2, 2022
b690e9d
Specify erasure of intersection types for the semantics of await expr…
eernstg Dec 9, 2022
0508fda
Typo
eernstg Jan 20, 2023
fd71308
Introduce \DynamicError, marking all dynamic errors just like compile…
eernstg Feb 2, 2023
10dce22
Changed the error margin markers to use red text
eernstg Feb 2, 2023
a947c63
Correct dynamic type of tear-off with covariant parameter
eernstg May 31, 2023
e0d10e1
Clarified tear-offs of methods with covariant parameters
eernstg May 31, 2023
0704c54
Correct a typo about closurization
eernstg May 31, 2023
844bfb4
Correction: Add definition of normalizedType/topMergeType for member …
eernstg Jun 16, 2023
3cbb3ec
Correction: Update dynamic type of covariant parameter to Object?
eernstg Jun 22, 2023
42ccb11
Typo
eernstg Jun 29, 2023
bde9831
Add commentary to emphasize that `new`/`const` can be implicit, and `…
eernstg Jul 5, 2023
64cc7ce
Add missing updates in section typeVoid
eernstg Jul 6, 2023
ba769d4
Add missing error: default values must be type correct
eernstg Jul 13, 2023
5ac887e
Add a paragraph explaining that the given section is about both optio…
eernstg Jul 13, 2023
d77bdbd
Post-rebase error correction
eernstg Jul 21, 2023
b6769ed
Correct usages of "final variable" and "constant variable"
eernstg Jul 21, 2023
910d194
Add missing declaration kind about getter/setter type error
eernstg Sep 11, 2023
01031da
Remove obsolete reference to "mixin composition" from section Supercl…
eernstg Sep 29, 2023
3edca93
Add comment about default values of noSuchMethod forwarders being und…
eernstg Sep 29, 2023
73bfb1a
Correct rule about the interface of T?
eernstg Jan 10, 2024
ec51ed1
Correct rule about interfaces of bounded types
eernstg Jan 10, 2024
8fc47af
Corrected many occurrences of "string" to "string literal"
eernstg Feb 22, 2024
6eed85b
Update the "parameter name `_...`" error
eernstg Apr 30, 2024
7125c45
Restore the index marker, define a command for it
eernstg Jun 17, 2024
9746e27
Corrected the huge rebase operation (removed TODO material)
eernstg Jun 17, 2024
9c72f5c
Fix obsolete ref
eernstg Aug 12, 2024
fceea0c
Introduce <memberedDeclarationBody> and use it
eernstg Aug 12, 2024
85715bb
Add change log entry
eernstg Aug 12, 2024
0aff06a
WIP
eernstg Oct 17, 2024
ae54d42
Clarified class building types
eernstg Nov 14, 2024
9e0a598
Correct the order of "bind formals to actuals", which has been rather…
eernstg Nov 27, 2024
6649b02
Correct the incorrect cleam that Null implements Object
eernstg Feb 14, 2025
19d5d68
Add missing cases to the definition of interface types
eernstg Apr 9, 2025
14e50e7
WIP
eernstg Apr 9, 2025
b52f109
Remove wrong brace
eernstg Jul 3, 2025
3c5229f
Fix one-liner commentary
eernstg Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions specification/dart.sty
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@
\newenvironment{commentary}[1]{{\color{commentaryColor}\sf{#1}}}{}

% Auxiliary functions.
\newcommand{\flattenName}{\mbox{\it flatten}}
\newcommand{\flattenName}{\metavar{flatten}}
\newcommand{\flatten}[1]{\ensuremath{\flattenName({#1})}}
\newcommand{\futureOrBase}[1]{\ensuremath{\mbox{\it futureOrBase}({#1})}}
\newcommand{\overrides}[1]{\ensuremath{\mbox{\it overrides}({#1})}}
\newcommand{\inherited}[1]{\ensuremath{\mbox{\it inherited}({#1})}}
\newcommand{\futureOrBase}[1]{\ensuremath{\metavar{futureOrBase}({#1})}}
\newcommand{\overrides}[1]{\ensuremath{\metavar{overrides}({#1})}}
\newcommand{\inherited}[1]{\ensuremath{\metavar{inherited}({#1})}}

% Used as a mini-section marker, indicating visibly that a range of
% text (usually just a couple of paragraphs) are concerned with one
Expand Down Expand Up @@ -173,9 +173,12 @@
\newcommand{\id}{\metavar{id}}
\newcommand{\op}{\metavar{op}}

% Used in margin to indicate that a term is being defined here.
\newcommand{\IndexMarker}{\ensuremath{^\vartriangle}}

% Used for defining occurrence of phrase, with customized index entry.
\newcommand{\IndexCustom}[2]{%
\leavevmode\marginpar{\ensuremath{_{^\vartriangle}}}\emph{#1}\index{#2}}
\leavevmode\marginpar{\IndexMarker}\emph{#1}\index{#2}}

% Used for the defining occurrence of a local symbol.
\newcommand{\DefineSymbol}[1]{%
Expand All @@ -196,11 +199,15 @@

% Same appearance, but not adding an entry to the index.
\newcommand{\NoIndex}[1]{%
\leavevmode\marginpar{\ensuremath{_{^\vartriangle}}}\emph{#1}}
\leavevmode\marginpar{\IndexMarker}\emph{#1}}

% Mark a compile-time error in the margin.
\newcommand{\Error}[1]{%
\leavevmode\marginpar{\ensuremath{_{^\ominus}}}{#1}}
\leavevmode\marginpar{\ensuremath{\textcolor{red}{\ominus}}}{#1}}

% Mark a dynamic error in the margin.
\newcommand{\DynamicError}[1]{%
\leavevmode\marginpar{\textcolor{red}{\Lightning}}{#1}}

% Used to specify comma separated lists of similar symbols.
\newcommand{\List}[3]{\ensuremath{{#1}_{#2},\,\ldots,\ {#1}_{#3}}}
Expand Down Expand Up @@ -402,9 +409,9 @@

% Same as \FunctionTypeNamed except suitable for inline usage, hence omitting
% the spacer argument.
\newcommand{\RawFunctionTypeNamed}[8]{%
\newcommand{\RawFunctionTypeNamed}[9]{%
\RawFunctionType{#1}{#2}{#3}{#4}{%
\FunctionTypeNamedParameters{#5}{#6}{#7}{#8}{r}}}
\FunctionTypeNamedParameters{#5}{#6}{#7}{#8}{#9}}}

% A variant of \FunctionTypeNamed that uses the standard symbols,
% that is, a function type with positional optional parameters which
Expand Down Expand Up @@ -466,17 +473,14 @@
\newcommand{\SubtypeStd}[2]{\Subtype{\Delta}{#1}{#2}}
% Subtype judgment where the environment is omitted (NE: "no environment").
\newcommand{\SubtypeNE}[2]{\ensuremath{{#1}\,<:\,{#2}}}
\newcommand{\MutualSubtype}[3]{\ensuremath{{#1}\vdash{#2}\,<:>\,{#3}}}
\newcommand{\MutualSubtypeStd}[2]{\MutualSubtype{\Delta}{#1}{#2}}
\newcommand{\MutualSubtypeNE}[2]{\ensuremath{{#1}\,<:>\,{#2}}}

% Judgment expressing that a supertype relation exists.
\newcommand{\Supertype}[3]{\ensuremath{{#1}\vdash{#2}\,:>\,{#3}}}
\newcommand{\SupertypeStd}[2]{\Supertype{\Delta}{#1}{#2}}

% Judgment expressing that an assignability relation exists.
\newcommand{\AssignableRelationSymbol}{\ensuremath{\Longleftrightarrow}}
\newcommand{\Assignable}[3]{%
\ensuremath{{#1}\vdash{#2}\,\AssignableRelationSymbol\,{#3}}}
\newcommand{\AssignableStd}[2]{\Assignable{\Gamma}{#1}{#2}}

% Semantic function delivering the superinterfaces of a class.
\newcommand{\Superinterfaces}[1]{\ensuremath{\metavar{Superinterfaces}({#1})}}
\newcommand{\Superinterface}[2]{{#1}\in\Superinterfaces{#2}}
Expand Down
Loading