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 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
47d258d
Rebasing
eernstg Oct 7, 2021
d29d819
Typos: Escaping braces meant to be code
eernstg Oct 8, 2021
60fb793
Eliminated text about migration features, adapted the remaining text …
eernstg Oct 8, 2021
d3fc4b7
Rebasing
eernstg Oct 13, 2021
bb72671
Reorganized material on null/Null
eernstg Oct 14, 2021
7802c95
Rebase
eernstg Oct 18, 2021
b3099d0
Rebasing
eernstg Oct 27, 2021
945bb91
Rebase
eernstg Nov 1, 2021
2a5c83f
WIP
eernstg Nov 9, 2021
83ee82c
Corrected last part of section Variables
eernstg Nov 10, 2021
fba8c03
Did expression typing, spread element, i2b
eernstg Nov 11, 2021
7473da8
Super-bounded types, least and greatest closure
eernstg Nov 12, 2021
46b016a
Assignability, generics
eernstg Nov 12, 2021
67f8b25
Extreme types
eernstg Nov 12, 2021
5cefc95
Extreme types, helper functions
eernstg Nov 15, 2021
15af632
Rebase
eernstg Nov 16, 2021
6efbaef
.call insertion on nullable type; clean up BlindDefineSymbol
eernstg Nov 16, 2021
2c4267f
Rebase
eernstg Nov 16, 2021
aeee68c
Main
eernstg Nov 16, 2021
fae8332
Type Type
eernstg Nov 17, 2021
9584c35
Type Type fixes
eernstg Nov 17, 2021
868779f
More typeType fixes
eernstg Nov 17, 2021
f24ba03
Constant instances (in particular: about canonical instances)
eernstg Nov 18, 2021
074c06f
Corrected variable initialization specification ("has been stored" ra…
eernstg Nov 19, 2021
dc253e2
Small adjustments to Variables
eernstg Nov 19, 2021
4232772
Rebase
eernstg Nov 26, 2021
537b374
Boolean conversion; type test; made true/false terminology consistent…
eernstg Nov 29, 2021
3b2b2d4
Constant types; type variable elimination in constants
eernstg Nov 29, 2021
b377646
Conditional expression; operators && and ||; `if` statements; delete …
eernstg Nov 30, 2021
50dea12
Integrate Null Promotion; put v==null rules into Type Promotion, and …
eernstg Dec 1, 2021
1d4a847
Null shorting
eernstg Dec 1, 2021
401df8c
Small fixes in section Null Shorting
eernstg Dec 1, 2021
39c5475
Revisiting all occurrences of \NULL/Null/null
eernstg Dec 2, 2021
22a0c29
Did much of Standard ... Bounds
eernstg Dec 3, 2021
63700ea
Standard bounds
eernstg Dec 7, 2021
f1ac643
Fixed the "SUB issues" section
eernstg Dec 8, 2021
2a0537d
Rebase
eernstg Dec 8, 2021
c55f1e3
Rebase
eernstg Dec 8, 2021
f108211
Rebase
eernstg Dec 8, 2021
a9ca79e
Rebase
eernstg Dec 9, 2021
943d030
Rebase
eernstg Dec 10, 2021
7738f83
Clarified and corrected Canonical Syntax
eernstg Dec 10, 2021
433b0f3
Fixed subsubsection --> subsection, 2*
eernstg Dec 10, 2021
793bf72
Typos
eernstg Jan 5, 2022
236bd75
Whitespace
eernstg Jan 6, 2022
322ffea
Interface type fixes
eernstg Jan 6, 2022
18fecb7
Sync with specify_null_safety_new_sections_dec21
eernstg Jan 7, 2022
cbfbe93
Mark a subtype rule as redundant, in a TODO comment
eernstg Jan 7, 2022
0ec3d04
Adjust no-loops-in-noSuchMethod example
eernstg Feb 7, 2022
1a8d490
Adjust no-loops-in-noSuchMethod example
eernstg Feb 8, 2022
cc984e9
Corrected function type subtype rule (bounds); corrected "math" index…
eernstg May 3, 2022
f2ab3dd
Adjust class building types
eernstg May 9, 2022
3376928
Adjust examples declaring non-nullable positional optional parameters…
eernstg Jul 26, 2022
c4bf445
Add a TODO to introduce `Any`
eernstg Nov 2, 2022
89f2941
Correct example in section about super-bounded types
eernstg Nov 3, 2022
bdb339b
Correction based on https://github.com/dart-lang/language/issues/2679
eernstg Dec 2, 2022
c48436f
Specify erasure of intersection types for the semantics of await expr…
eernstg Dec 9, 2022
8490256
Typo
eernstg Jan 20, 2023
f65d1c5
Introduce \DynamicError, marking all dynamic errors just like compile…
eernstg Feb 2, 2023
edff131
Changed the error margin markers to use red text
eernstg Feb 2, 2023
ab9108f
Correct dynamic type of tear-off with covariant parameter
eernstg May 31, 2023
56b44b8
Clarified tear-offs of methods with covariant parameters
eernstg May 31, 2023
94986b2
Correct a typo about closurization
eernstg May 31, 2023
1ff8b85
Correction: Add definition of normalizedType/topMergeType for member …
eernstg Jun 16, 2023
60b6348
Correction: Update dynamic type of covariant parameter to Object?
eernstg Jun 22, 2023
ee6bd6b
Typo
eernstg Jun 29, 2023
3bc427d
Add commentary to emphasize that `new`/`const` can be implicit, and `…
eernstg Jul 5, 2023
e07ffaf
Add missing updates in section typeVoid
eernstg Jul 6, 2023
5f2658b
Add missing error: default values must be type correct
eernstg Jul 13, 2023
097844a
Add a paragraph explaining that the given section is about both optio…
eernstg Jul 13, 2023
0c74d6c
Post-rebase error correction
eernstg Jul 21, 2023
bb18478
Correct usages of "final variable" and "constant variable"
eernstg Jul 21, 2023
f7b7a6b
Add missing declaration kind about getter/setter type error
eernstg Sep 11, 2023
e6de389
Remove obsolete reference to "mixin composition" from section Supercl…
eernstg Sep 29, 2023
65024fb
Add comment about default values of noSuchMethod forwarders being und…
eernstg Sep 29, 2023
c0040e0
Correct rule about the interface of T?
eernstg Jan 10, 2024
5429ded
Correct rule about interfaces of bounded types
eernstg Jan 10, 2024
41f67f8
Corrected many occurrences of "string" to "string literal"
eernstg Feb 22, 2024
a445d0e
Update the "parameter name `_...`" error
eernstg Apr 30, 2024
3289a87
Restore the index marker, define a command for it
eernstg Jun 17, 2024
921c774
Corrected the huge rebase operation (removed TODO material)
eernstg Jun 17, 2024
ccb40e6
Fix obsolete ref
eernstg Aug 12, 2024
27820da
Introduce <memberedDeclarationBody> and use it
eernstg Aug 12, 2024
dc8dfcf
Add change log entry
eernstg Aug 12, 2024
a510d09
WIP
eernstg Oct 17, 2024
5d76b73
Clarified class building types
eernstg Nov 14, 2024
aecbc16
Correct the order of "bind formals to actuals", which has been rather…
eernstg Nov 27, 2024
1579a4e
Correct the incorrect cleam that Null implements Object
eernstg Feb 14, 2025
0237ac6
Hide links
eernstg Feb 21, 2025
886c509
Add missing cases to the definition of interface types
eernstg Apr 9, 2025
717f18b
WIP
eernstg Apr 9, 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