[go: nahoru, domu]

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 81 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
d0811cc
Rebasing
eernstg Oct 7, 2021
ae53185
Typos: Escaping braces meant to be code
eernstg Oct 8, 2021
f3d8507
Eliminated text about migration features, adapted the remaining text …
eernstg Oct 8, 2021
bff6027
Rebasing
eernstg Oct 13, 2021
92fc551
Reorganized material on null/Null
eernstg Oct 14, 2021
8ccded9
Rebase
eernstg Oct 18, 2021
3987b3d
Rebasing
eernstg Oct 27, 2021
c98f437
Rebase
eernstg Nov 1, 2021
ed58b61
WIP
eernstg Nov 9, 2021
c111ceb
Corrected last part of section Variables
eernstg Nov 10, 2021
dfd590e
Did expression typing, spread element, i2b
eernstg Nov 11, 2021
75e7023
Super-bounded types, least and greatest closure
eernstg Nov 12, 2021
5575f29
Assignability, generics
eernstg Nov 12, 2021
53a9967
Extreme types
eernstg Nov 12, 2021
e6cdb97
Extreme types, helper functions
eernstg Nov 15, 2021
7afdc38
Rebase
eernstg Nov 16, 2021
de15537
.call insertion on nullable type; clean up BlindDefineSymbol
eernstg Nov 16, 2021
c0910cd
Rebase
eernstg Nov 16, 2021
f27f86b
Main
eernstg Nov 16, 2021
40ef209
Type Type
eernstg Nov 17, 2021
7f8413e
Type Type fixes
eernstg Nov 17, 2021
4d867c0
More typeType fixes
eernstg Nov 17, 2021
644986a
Constant instances (in particular: about canonical instances)
eernstg Nov 18, 2021
074db1d
Corrected variable initialization specification ("has been stored" ra…
eernstg Nov 19, 2021
68d87ae
Small adjustments to Variables
eernstg Nov 19, 2021
a2bb6ca
Rebase
eernstg Nov 26, 2021
b583f3f
Boolean conversion; type test; made true/false terminology consistent…
eernstg Nov 29, 2021
053e09e
Constant types; type variable elimination in constants
eernstg Nov 29, 2021
ecabd43
Conditional expression; operators && and ||; `if` statements; delete …
eernstg Nov 30, 2021
0199748
Integrate Null Promotion; put v==null rules into Type Promotion, and …
eernstg Dec 1, 2021
d4a5c67
Null shorting
eernstg Dec 1, 2021
015d020
Small fixes in section Null Shorting
eernstg Dec 1, 2021
7faffb0
Revisiting all occurrences of \NULL/Null/null
eernstg Dec 2, 2021
01cb5a1
Did much of Standard ... Bounds
eernstg Dec 3, 2021
91c126d
Standard bounds
eernstg Dec 7, 2021
455630c
Fixed the "SUB issues" section
eernstg Dec 8, 2021
a261360
Rebase
eernstg Dec 8, 2021
81de15f
Rebase
eernstg Dec 8, 2021
0dc2b83
Rebase
eernstg Dec 8, 2021
ee90d78
Rebase
eernstg Dec 9, 2021
729e261
Rebase
eernstg Dec 10, 2021
38a6921
Clarified and corrected Canonical Syntax
eernstg Dec 10, 2021
649c437
Fixed subsubsection --> subsection, 2*
eernstg Dec 10, 2021
c008ec2
Typos
eernstg Jan 5, 2022
fc613cb
Whitespace
eernstg Jan 6, 2022
0f8e0ee
Interface type fixes
eernstg Jan 6, 2022
f1e186f
Sync with specify_null_safety_new_sections_dec21
eernstg Jan 7, 2022
23dfe70
Mark a subtype rule as redundant, in a TODO comment
eernstg Jan 7, 2022
46e277d
Adjust no-loops-in-noSuchMethod example
eernstg Feb 7, 2022
0dec511
Adjust no-loops-in-noSuchMethod example
eernstg Feb 8, 2022
ea9f425
Corrected function type subtype rule (bounds); corrected "math" index…
eernstg May 3, 2022
98ec8de
Adjust class building types
eernstg May 9, 2022
e0fbf25
Adjust examples declaring non-nullable positional optional parameters…
eernstg Jul 26, 2022
e3f7804
Add a TODO to introduce `Any`
eernstg Nov 2, 2022
1df466b
Correct example in section about super-bounded types
eernstg Nov 3, 2022
6e91dc5
Correction based on https://github.com/dart-lang/language/issues/2679
eernstg Dec 2, 2022
e7970ad
Specify erasure of intersection types for the semantics of await expr…
eernstg Dec 9, 2022
c06d9b7
Typo
eernstg Jan 20, 2023
21920b7
Introduce \DynamicError, marking all dynamic errors just like compile…
eernstg Feb 2, 2023
8b1f9b3
Changed the error margin markers to use red text
eernstg Feb 2, 2023
52728d9
Correct dynamic type of tear-off with covariant parameter
eernstg May 31, 2023
5d8d8c9
Clarified tear-offs of methods with covariant parameters
eernstg May 31, 2023
ca38e1d
Correct a typo about closurization
eernstg May 31, 2023
9025186
Correction: Add definition of normalizedType/topMergeType for member …
eernstg Jun 16, 2023
4db16fb
Correction: Update dynamic type of covariant parameter to Object?
eernstg Jun 22, 2023
a090cb5
Typo
eernstg Jun 29, 2023
91d205a
Add commentary to emphasize that `new`/`const` can be implicit, and `…
eernstg Jul 5, 2023
54d35bd
Add missing updates in section typeVoid
eernstg Jul 6, 2023
dc8a1b5
Add missing error: default values must be type correct
eernstg Jul 13, 2023
76e5654
Add a paragraph explaining that the given section is about both optio…
eernstg Jul 13, 2023
0d40956
Post-rebase error correction
eernstg Jul 21, 2023
97e0128
Correct usages of "final variable" and "constant variable"
eernstg Jul 21, 2023
da08c68
Add missing declaration kind about getter/setter type error
eernstg Sep 11, 2023
2e8051b
Remove obsolete reference to "mixin composition" from section Supercl…
eernstg Sep 29, 2023
7731e25
Add comment about default values of noSuchMethod forwarders being und…
eernstg Sep 29, 2023
eb352ca
Correct rule about the interface of T?
eernstg Jan 10, 2024
55e362d
Correct rule about interfaces of bounded types
eernstg Jan 10, 2024
35ff04d
Corrected many occurrences of "string" to "string literal"
eernstg Feb 22, 2024
79258a0
Update the "parameter name `_...`" error
eernstg Apr 30, 2024
8c9fe27
Restore the index marker, define a command for it
eernstg Jun 17, 2024
3f3003c
Corrected the huge rebase operation (removed TODO material)
eernstg Jun 17, 2024
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
Prev Previous commit
Next Next commit
Correction: Add definition of normalizedType/topMergeType for member …
…signatures
  • Loading branch information
eernstg committed Jun 19, 2024
commit 9025186edee27c5fe5e57029b34a5ea77969062e
45 changes: 44 additions & 1 deletion specification/dartLangSpec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11687,7 +11687,7 @@ \subsubsection{Sets}
and it is evaluated at run time.
Only run-time set literals can be mutated after they are created.
% This error can occur because being constant is a dynamic property, here.
Attempting to mutate a constant set literal
Attempting to mutate a constant set literal
will result in a \DynamicError{dynamic error}.

\commentary{%
Expand Down Expand Up @@ -23462,6 +23462,34 @@ \subsection{Functions Dealing with Extreme Types}
and then recursively taking \TopMergeTypeName{} of the rest.
\commentary{The ordering of the arguments makes no difference.}

\LMHash{}%
We generalize \TopMergeTypeName{} such that
it can be applied to two or more member signatures rather than types.
The case with more than two member signatures is defined in the same way as
the case with more than two types.
With member signatures $m_1$ and $m_2$
that are structurally identical modulo the choice of top types
and the occurrences of the modifier \COVARIANT,
\TopMergeType{$m_1$}{$m_2$} is a member signature $m$ such
that every pair of types $T_1$ and $T_2$ that occur in $m_1$ respectively $m_2$
yields \TopMergeType{$T_1$}{$T_2$} in the result,
the modifier \COVARIANT{} occurs on every parameter in $m$
where the corresponding parameter in $m_1$ or in $m_2$ has that modifier,
and all other non-type parts of $m_1$ and $m_2$ occur identically in the result.

\commentary{%
For example,

\noindent
\TopMergeType{\VOID\,\,m(List<\DYNAMIC>)}
{\DYNAMIC\,\,m(\COVARIANT\,\,List<Object?>)}

\noindent
is the member signature
\code{Object?\,\,m(\COVARIANT\,\,List<Object?>)}.%
}


\LMHash{}%
The \IndexCustom{\IsTopTypeName}{isTopType@\IsTopTypeName}
predicate is true for any type which is in
Expand Down Expand Up @@ -23710,6 +23738,21 @@ \subsection{Type Normalization}
\end{displaymath}
}

\LMHash{}%
We generalize \NormalizedTypeOfName{} such that
it can be applied to a member signature rather than a type.
This maps a member signature $m$ to a member signature $m'$ such
that every type $T$ that occurs in $m$ is replaced by
\NormalizedTypeOf{$T$}, and all other parts of $m'$ are identical to
the corresponding part of $m$.

\commentary{%
For example,
\NormalizedTypeOf{\VOID\,\,m(\COVARIANT\,\,FutureOr<Object>)}
is the member signature
\code{\VOID\,\,m(\COVARIANT\,\,Object)}.%
}


\subsection{The Canonical Syntax of Types}
\LMLabel{theCanonicalSyntaxOfTypes}
Expand Down