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 subtyping #3515

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 15 additions & 12 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 @@ -200,7 +200,11 @@

% 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 +406,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 @@ -471,11 +475,10 @@
\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}}
% Judgment expressing that a subtype and a supertype relation exist.
\newcommand{\MutualSubtype}[3]{\ensuremath{{#1}\vdash{#2}\,<:>\,{#3}}}
\newcommand{\MutualSubtypeStd}[2]{\MutualSubtype{\Delta}{#1}{#2}}
\newcommand{\MutualSubtypeNE}[2]{\ensuremath{{#1}\,<:>\,{#2}}}

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