Update spec on interface, mixin and async.

Change-Id: If445e1c154fc5b99b59d96ec3338f4273ee431dc
Reviewed-on: https://dart-review.googlesource.com/55282
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Lasse R.H. Nielsen
2018-05-16 19:09:52 +00:00
committed by commit-bot@chromium.org
parent d9d7cb12a6
commit 43635d3372
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -21,7 +21,9 @@
\def\GET{\builtinId{get}}
\def\IMPLEMENTS{\builtinId{implements}}
\def\IMPORT{\builtinId{import}}
\def\INTERFACE{\builtinId{interface}}
\def\LIBRARY{\builtinId{library}}
\def\MIXIN{\builtinId{mixin}}
\def\OPERATOR{\builtinId{operator}}
\def\PART{\builtinId{part}}
\def\SET{\builtinId{set}}
+5 -1
View File
@@ -45,6 +45,8 @@
% - Specify `call` for Dart 2 (no function type given to enclosing class).
% - Clarify that an identifier reference denoting a top-level, static, or
% local function evaluates to the closurization of that declaration.
% - Make `mixin` and `interface` built-in identifiers.
% - Make `async` *not* a reserved word inside async functions.
%
% 1.15
% - Change how language specification describes control flow.
@@ -6847,8 +6849,10 @@ An {\em identifier expression} consists of a single identifier; it provides acce
\GET{};
\IMPLEMENTS{};
\IMPORT{};
\INTERFACE{};
\LIBRARY{};
\OPERATOR{};
\MIXIN{};
\PART{};
\SET{};
\STATIC{};
@@ -6891,7 +6895,7 @@ Furthermore, types should begin with an uppercase letter (see the appendix) and
}
\LMHash{}
It is a compile-time error if any of the identifiers \ASYNC, \AWAIT{} or \YIELD{} is used as an identifier in a function body marked with either \ASYNC{}, \ASYNC* or \SYNC*.
It is a compile-time error if either of the identifiers \AWAIT{} or \YIELD{} is used as an identifier in a function body marked with either \ASYNC{}, \ASYNC* or \SYNC*.
\rationale{
For compatibility reasons, new constructs cannot rely upon new reserved words or even built-in identifiers.