Skip to content
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

Specify null safety #2605

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
2a62640
Rebasing
eernstg Oct 7, 2021
1622e77
Typos: Escaping braces meant to be code
eernstg Oct 8, 2021
9c1fdec
Eliminated text about migration features, adapted the remaining text …
eernstg Oct 8, 2021
8258a94
Rebasing
eernstg Oct 13, 2021
6775108
Reorganized material on null/Null
eernstg Oct 14, 2021
2b5691e
Rebase
eernstg Oct 18, 2021
3e24364
Rebasing
eernstg Oct 27, 2021
d4287bc
Rebase
eernstg Nov 1, 2021
c54d0c1
WIP
eernstg Nov 9, 2021
fc82d02
Corrected last part of section Variables
eernstg Nov 10, 2021
ca2d001
Did expression typing, spread element, i2b
eernstg Nov 11, 2021
5afe48e
Super-bounded types, least and greatest closure
eernstg Nov 12, 2021
776af9a
Assignability, generics
eernstg Nov 12, 2021
2ff271f
Extreme types
eernstg Nov 12, 2021
2b99ae5
Extreme types, helper functions
eernstg Nov 15, 2021
2d2381a
Rebase
eernstg Nov 16, 2021
ef92b19
.call insertion on nullable type; clean up BlindDefineSymbol
eernstg Nov 16, 2021
9e5776a
Rebase
eernstg Nov 16, 2021
1e0e66b
Main
eernstg Nov 16, 2021
995751b
Type Type
eernstg Nov 17, 2021
743ade6
Type Type fixes
eernstg Nov 17, 2021
b6fce07
More typeType fixes
eernstg Nov 17, 2021
1049239
Constant instances (in particular: about canonical instances)
eernstg Nov 18, 2021
9a51a69
Corrected variable initialization specification ("has been stored" ra…
eernstg Nov 19, 2021
45f6b8b
Small adjustments to Variables
eernstg Nov 19, 2021
d418fc2
Rebase
eernstg Nov 26, 2021
dace245
Boolean conversion; type test; made true/false terminology consistent…
eernstg Nov 29, 2021
d92f458
Constant types; type variable elimination in constants
eernstg Nov 29, 2021
af97646
Conditional expression; operators && and ||; `if` statements; delete …
eernstg Nov 30, 2021
dce343e
Integrate Null Promotion; put v==null rules into Type Promotion, and …
eernstg Dec 1, 2021
ccea481
Null shorting
eernstg Dec 1, 2021
9051333
Small fixes in section Null Shorting
eernstg Dec 1, 2021
2516c0d
Revisiting all occurrences of \NULL/Null/null
eernstg Dec 2, 2021
d24f8a0
Did much of Standard ... Bounds
eernstg Dec 3, 2021
b1422aa
Standard bounds
eernstg Dec 7, 2021
6f2bbb9
Fixed the "SUB issues" section
eernstg Dec 8, 2021
2e7f808
Rebase
eernstg Dec 8, 2021
9d64bf1
Rebase
eernstg Dec 8, 2021
d122060
Rebase
eernstg Dec 8, 2021
e90db4c
Rebase
eernstg Dec 9, 2021
426815c
Rebase
eernstg Dec 10, 2021
2eb2886
Clarified and corrected Canonical Syntax
eernstg Dec 10, 2021
5420bd0
Fixed subsubsection --> subsection, 2*
eernstg Dec 10, 2021
a898d9c
Typos
eernstg Jan 5, 2022
fe17860
Whitespace
eernstg Jan 6, 2022
36a38ea
Interface type fixes
eernstg Jan 6, 2022
18a9772
Sync with specify_null_safety_new_sections_dec21
eernstg Jan 7, 2022
f1dc067
Mark a subtype rule as redundant, in a TODO comment
eernstg Jan 7, 2022
6981f4e
Adjust no-loops-in-noSuchMethod example
eernstg Feb 7, 2022
9ab5c47
Adjust no-loops-in-noSuchMethod example
eernstg Feb 8, 2022
0b32c99
Corrected function type subtype rule (bounds); corrected "math" index…
eernstg May 3, 2022
cfac310
Adjust class building types
eernstg May 9, 2022
f145ffa
Adjust examples declaring non-nullable positional optional parameters…
eernstg Jul 26, 2022
3392fd4
Add a TODO to introduce `Any`
eernstg Nov 2, 2022
97d2053
Correct example in section about super-bounded types
eernstg Nov 3, 2022
c116128
Correction based on https://github.com/dart-lang/language/issues/2679
eernstg Dec 2, 2022
73e13f6
Specify erasure of intersection types for the semantics of await expr…
eernstg Dec 9, 2022
a68dc69
Typo
eernstg Jan 20, 2023
eed2eb0
Introduce \DynamicError, marking all dynamic errors just like compile…
eernstg Feb 2, 2023
db3dd07
Changed the error margin markers to use red text
eernstg Feb 2, 2023
bb7cc95
Correct dynamic type of tear-off with covariant parameter
eernstg May 31, 2023
0244264
Clarified tear-offs of methods with covariant parameters
eernstg May 31, 2023
9e82a70
Correct a typo about closurization
eernstg May 31, 2023
c19d724
Correction: Add definition of normalizedType/topMergeType for member …
eernstg Jun 16, 2023
caa33ac
Correction: Update dynamic type of covariant parameter to Object?
eernstg Jun 22, 2023
7c88ae2
Typo
eernstg Jun 29, 2023
cf0b0df
Add commentary to emphasize that `new`/`const` can be implicit, and `…
eernstg Jul 5, 2023
216053a
Add missing updates in section typeVoid
eernstg Jul 6, 2023
7a328c9
Add missing error: default values must be type correct
eernstg Jul 13, 2023
fd0c904
Add a paragraph explaining that the given section is about both optio…
eernstg Jul 13, 2023
c193857
Eliminate duplication of declarations due to rebase
eernstg Jul 19, 2023
e0e3f59
Post-rebase error correction
eernstg Jul 21, 2023
41865b7
Correct usages of "final variable" and "constant variable"
eernstg Jul 21, 2023
313ff05
Add missing declaration kind about getter/setter type error
eernstg Sep 11, 2023
00eecc7
Remove obsolete reference to "mixin composition" from section Supercl…
eernstg Sep 29, 2023
7a5e19e
Add comment about default values of noSuchMethod forwarders being und…
eernstg Sep 29, 2023
867d05b
Correct rule about the interface of T?
eernstg Jan 10, 2024
b5bbdc8
Correct rule about interfaces of bounded types
eernstg Jan 10, 2024
6df95a8
Corrected many occurrences of "string" to "string literal"
eernstg Feb 22, 2024
3da1c5b
Update the "parameter name `_...`" error
eernstg Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 15 additions & 14 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 @@ -175,7 +175,7 @@

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

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

% Same appearance, but not adding an entry to the index.
\newcommand{\NoIndex}[1]{%
\leavevmode\marginpar{\ensuremath{_{^\vartriangle}}}\emph{#1}}
\leavevmode\marginpar{\ensuremath{\vartriangle}}\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,7 +406,7 @@

% 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}}}

Expand Down Expand Up @@ -466,17 +470,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