Skip to content

Commit d37c3c6

Browse files
committed
Version 2.1.0-dev.0.0
Merge commit 'f3a2c0e28faf132a550c1fad8c2e6d9f67107ab1' into dev
2 parents 95919ce + f3a2c0e commit d37c3c6

File tree

1,175 files changed

+46825
-42666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,175 files changed

+46825
-42666
lines changed

CHANGELOG.md

Lines changed: 489 additions & 902 deletions
Large diffs are not rendered by default.

DEPS

Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ vars = {
5151
"gperftools_revision": "9608fa3bcf8020d35f59fbf70cd3cbe4b015b972",
5252

5353
# Revisions of /third_party/* dependencies.
54-
"args_tag": "1.4.1",
55-
"async_tag": "2.0.7",
54+
"args_tag": "1.4.4",
55+
"async_tag": "2.0.8",
5656
"bazel_worker_tag": "0.1.11",
57-
"boolean_selector_tag" : "1.0.3",
57+
"boolean_selector_tag" : "1.0.4",
5858
"boringssl_gen_rev": "fc47eaa1a245d858bae462cd64d4155605b850ea",
5959
"boringssl_rev" : "189270cd190267f5bd60cfe8f8ce7a61d07ba6f4",
60-
"charcode_tag": "v1.1.1",
60+
"charcode_tag": "v1.1.2",
6161
"chrome_rev" : "19997",
62-
"cli_util_rev" : "fb5ee65ab72f6b4dd99a53efd992979ebdaf10df",
63-
"collection_tag": "1.14.10",
64-
"convert_tag": "2.0.1",
65-
"crypto_tag" : "2.0.5",
66-
"csslib_tag" : "0.14.1",
62+
"cli_util_rev" : "4ad7ccbe3195fd2583b30f86a86697ef61e80f41",
63+
"collection_tag": "1.14.11",
64+
"convert_tag": "2.0.2",
65+
"crypto_tag" : "2.0.6",
66+
"csslib_tag" : "0.14.4+1",
6767
"dart2js_info_tag" : "0.5.6+4",
6868

6969
# Note: updates to dart_style have to be coordinated carefully with
@@ -80,11 +80,11 @@ vars = {
8080
# For more details, see https://github.com/dart-lang/sdk/issues/30164
8181
"dart_style_tag": "1.1.3", # Please see the note above before updating.
8282

83-
"dartdoc_tag" : "v0.20.1",
84-
"fixnum_tag": "0.10.5",
83+
"dartdoc_tag" : "v0.20.2",
84+
"fixnum_tag": "0.10.8",
8585
"func_rev": "25eec48146a58967d75330075ab376b3838b18a8",
86-
"glob_tag": "1.1.5",
87-
"html_tag" : "0.13.3",
86+
"glob_tag": "1.1.7",
87+
"html_tag" : "0.13.3+2",
8888
"http_io_rev": "265e90afbffacb7b2988385d4a6aa2f14e970d44",
8989
"http_multi_server_tag" : "2.0.5",
9090
"http_parser_tag" : "3.1.1",
@@ -94,55 +94,54 @@ vars = {
9494
"idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
9595
"intl_tag": "0.15.6",
9696
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
97-
"json_rpc_2_tag": "2.0.8",
97+
"json_rpc_2_tag": "2.0.9",
9898
"linter_tag": "0.1.58",
99-
"logging_tag": "0.11.3+1",
100-
"markdown_tag": "2.0.1",
99+
"logging_tag": "0.11.3+2",
100+
"markdown_tag": "2.0.2",
101101
"matcher_tag": "0.12.3",
102-
"mime_tag": "0.9.6+1",
102+
"mime_tag": "0.9.6+2",
103103
"mockito_tag": "d39ac507483b9891165e422ec98d9fb480037c8b",
104104
"mustache4dart_tag" : "v2.1.2",
105105
"oauth2_tag": "1.2.1",
106106
"observatory_pub_packages_rev": "0894122173b0f98eb08863a7712e78407d4477bc",
107-
"package_config_tag": "1.0.3",
108-
"package_resolver_tag": "1.0.3",
109-
"path_tag": "1.5.1",
110-
"plugin_tag": "0.2.0+2",
107+
"package_config_tag": "1.0.5",
108+
"package_resolver_tag": "1.0.4",
109+
"path_tag": "1.6.2",
110+
"plugin_tag": "f5b4b0e32d1406d62daccea030ba6457d14b1c47",
111111
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
112-
"pool_tag": "1.3.4",
112+
"pool_tag": "1.3.6",
113113
"protobuf_tag": "0.9.0",
114-
"pub_rev": "58fe996eab8d54f28f5109c407ff0ab62fbd835d",
115-
"pub_semver_tag": "1.4.1",
116-
"quiver_tag": "0.29.0",
117-
"resource_rev": "b786afa7567fc6b95c185edb01cc4e9d3dadbe30",
114+
"pub_rev": "5962908a66e814dd78f6856a4e5f792c6db65fbc",
115+
"pub_semver_tag": "1.4.2",
116+
"quiver_tag": "0.29.0+2",
117+
"resource_rev": "2.1.5",
118118
"root_certificates_rev": "16ef64be64c7dfdff2b9f4b910726e635ccc519e",
119119
"shelf_static_rev": "v0.2.8",
120-
"shelf_packages_handler_tag": "1.0.3",
121-
"shelf_tag": "0.7.3+2",
122-
"shelf_web_socket_tag": "0.2.2+2",
123-
"source_map_stack_trace_tag": "1.1.4",
120+
"shelf_packages_handler_tag": "1.0.4",
121+
"shelf_tag": "0.7.3+3",
122+
"shelf_web_socket_tag": "0.2.2+3",
123+
"source_map_stack_trace_tag": "1.1.5",
124124
"source_maps-0.9.4_rev": "38524",
125-
"source_maps_tag": "0.10.6",
126-
"source_span_tag": "1.4.0",
127-
"stack_trace_tag": "1.9.2",
128-
"stream_channel_tag": "1.6.4",
129-
"string_scanner_tag": "1.0.2",
130-
"sunflower_rev": "879b704933413414679396b129f5dfa96f7a0b1e",
125+
"source_maps_tag": "8af7cc1a1c3a193c1fba5993ce22a546a319c40e",
126+
"source_span_tag": "1.4.1",
127+
"stack_trace_tag": "1.9.3",
128+
"stream_channel_tag": "1.6.8",
129+
"string_scanner_tag": "1.0.3",
131130
"test_descriptor_tag": "1.1.1",
132131
"test_process_tag": "1.0.3",
133-
"term_glyph_tag": "1.0.0",
134-
"test_reflective_loader_tag": "0.1.4",
132+
"term_glyph_tag": "1.0.1",
133+
"test_reflective_loader_tag": "0.1.8",
135134
"test_tag": "1.0.0",
136135
"tuple_tag": "v1.0.1",
137-
"typed_data_tag": "1.1.3",
136+
"typed_data_tag": "1.1.6",
138137
"unittest_rev": "2b8375bc98bb9dc81c539c91aaea6adce12e1072",
139138
"usage_tag": "3.4.0",
140-
"utf_tag": "0.9.0+4",
141-
"watcher_rev": "908d74c6ed0889fa9bd7939c72bcc287e4f581fd",
139+
"utf_tag": "0.9.0+5",
140+
"watcher_rev": "0.9.7+10",
142141
"web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
143-
"web_socket_channel_tag": "1.0.8",
142+
"web_socket_channel_tag": "1.0.9",
144143
"WebCore_rev": "fb11e887f77919450e497344da570d780e078bc8",
145-
"yaml_tag": "2.1.14",
144+
"yaml_tag": "2.1.15",
146145
"zlib_rev": "c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f",
147146
}
148147

@@ -158,7 +157,7 @@ deps = {
158157
"packages": [
159158
{
160159
"package": "dart/dart-sdk/${{platform}}",
161-
"version": "version:2.0.0-dev.68.0",
160+
"version": "version:2.0.0-dev.69.5",
162161
},
163162
],
164163
"dep_type": "cipd",
@@ -328,10 +327,6 @@ deps = {
328327
Var("dart_root") + "/third_party/pkg/string_scanner":
329328
Var("dart_git") + "string_scanner.git" +
330329
"@" + Var("string_scanner_tag"),
331-
Var("dart_root") + "/third_party/sunflower":
332-
Var("chromium_git") +
333-
"/external/github.com/dart-lang/sample-sunflower.git" +
334-
"@" + Var("sunflower_rev"),
335330
Var("dart_root") + "/third_party/pkg/term_glyph":
336331
Var("dart_git") + "term_glyph.git" + "@" + Var("term_glyph_tag"),
337332
Var("dart_root") + "/third_party/pkg/test":

WATCHLISTS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
'kernel': {
2828
'filepath': '^pkg/kernel',
2929
},
30+
'dart2js': {
31+
'filepath': (
32+
'^pkg/compiler|'
33+
'^tests/compiler'
34+
)
35+
},
3036
'package_vm': {
3137
'filepath': '^pkg/vm',
3238
},
@@ -72,5 +78,7 @@
7278
'observatory': [ '[email protected]' ],
7379
'package_vm': [ '[email protected]' ],
7480
'runtime': [ '[email protected]' ],
81+
82+
7583
},
7684
}

docs/language/informal/generalized-void.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Author**: eernst@
44

5-
**Version**: 0.9 (2018-02-22)
5+
**Version**: 0.10 (2018-07-10)
66

77
**Status**: Under implementation.
88

@@ -274,13 +274,17 @@ for the following situations:
274274
type void; the static type of the conditional expression is then the
275275
type void. (*This is true even if one of the branches has a different
276276
type.*)
277+
* In a null coalescing expression `e1 ?? e2`, `e2` may have the type void; the
278+
static type of the null coalescing expression is then the type void.
277279
* If _N1_ and _N2_ are non-terminals in the Dart grammar, and there is a
278280
derivation of the form _N1 --> N2_, and _N2_ can have type void, then
279281
_N1_ can also have type void for such a derivation. *In this derivation
280282
no additional tokens are included, it is only the non-terminal which
281283
changes.*
282284
* In a return statement `return e;`, when the return type of the innermost
283-
enclosing function is the type void, `e` may have type void.
285+
enclosing function is the type void or dynamic, `e` may have type void.
286+
* In an arrow function body `=> e`, when the return type is the type void
287+
or dynamic, the returned expression `e` may have type void.
284288
* An initializing expression for a variable of type void may have the type
285289
void.
286290
* An actual parameter expression corresponding to a formal parameter whose
@@ -387,6 +391,10 @@ bound as `Object`.
387391

388392
## Updates
389393

394+
* July 10th 2018, v0.10: Added case to whitelist: It is not an error
395+
to `return e;` with an `e` of type `void` when the return type is
396+
`dynamic`.
397+
390398
* February 22nd 2018, v0.9: Added several new contexts where an
391399
expression with static type void may be evaluated, such that pure data
392400
transfers to a target of type void are allowed. For instance, a void
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Dart 2 function return checking
2+
3+
4+
5+
**Note: Also see alternative presentation at the bottom for a dual presentation
6+
of these rules in terms of which things are errors, rather than which things are
7+
valid*.*
8+
9+
## Errors for sync and async function return values in Dart 2
10+
11+
### Expression bodied functions
12+
13+
14+
An asynchronous expression bodied function with return type `T` and return
15+
expression `e` has a valid return if:
16+
* `flatten(T)` is `void`
17+
* or `return exp;` is a valid return for an equivalent block bodied function
18+
with return type `T` as defined below.
19+
20+
A synchronous expression bodied function with return type `T` and return expression
21+
`e` has a valid return if:
22+
* `T` is `void`
23+
* or `return exp;` is a valid return for an equivalent block bodied function
24+
with return type `T` as defined below.
25+
26+
### Block bodied functions
27+
28+
#### Synchronous functions
29+
30+
The rules for a synchronous non-generator function with declared return type `T`
31+
are:
32+
33+
* `return;` is a valid return if any of the following are true:
34+
* `T` is `void`
35+
* `T` is `dynamic`
36+
* `T` is `Null`.
37+
38+
* `return exp;` where `exp` has static type `S` is a valid return if:
39+
* `S` is `void`
40+
* and `T` is `void` or `dynamic` or `Null`
41+
42+
* `return exp;` where `exp` has static type `S` is a valid return if:
43+
* `T` is `void`
44+
* and `S` is `void` or `dynamic` or `Null`
45+
46+
* `return exp;` where `exp` has static type `S` is a valid return if:
47+
* `T` is not `void`
48+
* and `S` is not `void`
49+
* and `S` is assignable to `T`
50+
51+
#### Asynchronous functions
52+
53+
The rules for an asynchronous non-generator function with declared return type
54+
`T` are:
55+
56+
* `return;` is a valid return if any of the following are true:
57+
* `flatten(T)` is `void`
58+
* `flatten(T)` is `dynamic`
59+
* `flatten(T)` is `Null`.
60+
61+
* `return exp;` where `exp` has static type `S` is a valid return if:
62+
* `flatten(S)` is `void`
63+
* and `flatten(T)` is `void`, `dynamic` or `Null`
64+
65+
* `return exp;` where `exp` has static type `S` is a valid return if:
66+
* `flatten(T)` is `void`
67+
* and `flatten(S)` is `void`, `dynamic` or `Null`
68+
69+
* `return exp;` where `exp` has static type `S` is a valid return if:
70+
* `flatten(T)` is not `void`
71+
* and `flatten(S)` is not `void`
72+
* and `Future<flatten(S)>` is assignable to `T`
73+
74+
75+
## Errors for sync and async function return values in Dart 2: Alternative presentation in terms of which things *are* errors
76+
77+
### Expression bodied functions
78+
79+
80+
It is an error if an asynchronous expression bodied function with return type `T`
81+
has return expression `exp` and both:
82+
* `flatten(T)` is not `void`
83+
* `return exp;` would be an error in an equivalent block bodied function
84+
with return type `T` as defined below.
85+
86+
It is an error if a synchronous expression bodied function with return type `T`
87+
has return expression `exp` and both:
88+
* `T` is not `void`
89+
* `return exp;` would be an error in an equivalent block bodied function
90+
with return type `T` as defined below.
91+
92+
### Block bodied functions
93+
94+
#### Synchronous functions
95+
96+
The rules for a synchronous non-generator function with declared return type `T`
97+
are:
98+
99+
* `return;` is an error if `T` is not `void`, `dynamic`, or `Null`
100+
101+
* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and
102+
`S` is not `void`, `dynamic`, or `Null`
103+
104+
* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and
105+
`T` is not `void`, or `dynamic` or `Null`.
106+
107+
* `return exp;` where `exp` has static type `S` is an error if `S` is not
108+
assignable to `T`.
109+
110+
#### Asynchronous functions
111+
112+
The rules for an asynchronous non-generator function with declared return type
113+
`T` are:
114+
115+
* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null`
116+
117+
* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is
118+
`void` and `flatten(S)` is not `void`, `dynamic`, or `Null`
119+
120+
* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is
121+
`void` and `flatten(T)` is not `void`, `dynamic`, or `Null`.
122+
123+
* `return exp;` where `exp` has static type `S` is an error if
124+
`Future<flatten(S)>` is not assignable to `T`.

0 commit comments

Comments
 (0)