CHANGELOG: move language section to the top of 2.14

Also apply new formatting style to dart format section

Change-Id: I5e7ad454ff2794dc98eb4f1868416beb45b1c68e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206340
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
Kevin Moore 2021-07-09 17:14:15 +00:00 committed by commit-bot@chromium.org
parent 2f38c2094b
commit 359fcac96d

View file

@ -1,5 +1,49 @@
## 2.14.0
### Language
- Add an unsigned shift right operator `>>>`. Pad with zeroes, ignoring the sign
bit. On the web platform `int.>>>` shifts the low 32 bits interpreted as an
unsigned integer, so `a >>> b` gives the same result as
`a.toUnsigned(32) >>> b` on the VM.
- Prior to Dart 2.14, metadata (annotations) were not permitted to be specified
with generic type arguments. This restriction is lifted in Dart Dart 2.14.
```dart
class C<T> {
const C();
}
@C(); // Previously permitted.
@C<int>(); // Previously an error, now permitted.
```
- Prior to Dart 2.14, generic function types were not permitted as arguments to
generic classes or functions, nor to be used as generic bounds. This
restriction is lifted in Dart 2.14.
```dart
T wrapWithLogging<T>(T f) {
if (f is void Function<T>(T x)) {
return <S>(S x) {
print("Call: f<$S>($x)");
var r = f<S>(x);
print("Return: $x");
return r;
} as T;
} // More cases here
return f;
}
void foo<T>(T x) {
print("Foo!");
}
void main() {
// Previously an error, now permitted.
var f = wrapWithLogging<void Function<T>(T)>(foo);
f<int>(3);
}
```
### Core libraries
#### `dart:async`
@ -107,11 +151,11 @@
#### dart format
* Simplify and optimize cascade formatting.
See: https://github.com/dart-lang/dart_style/pull/1033
* Don't unnecessarily split argument lists with `/* */` comments.
* Return correct exit code from `FormatCommand` when formatting stdin.
* Split empty catch blocks with finally clauses or catches after them.
- Simplify and optimize cascade formatting. See:
https://github.com/dart-lang/dart_style/pull/1033
- Don't unnecessarily split argument lists with `/* */` comments.
- Return correct exit code from `FormatCommand` when formatting stdin.
- Split empty catch blocks with finally clauses or catches after them.
#### Linter
@ -190,50 +234,6 @@ Updated the Linter to `1.7.0`, which includes changes that
- Incremental compilation is now used for compilation of executables from
dependencies when using `dart run <package>:<command>`.
### Language
- Add an unsigned shift right operator `>>>`. Pad with zeroes, ignoring the sign
bit. On the web platform `int.>>>` shifts the low 32 bits interpreted as an
unsigned integer, so `a >>> b` gives the same result as
`a.toUnsigned(32) >>> b` on the VM.
- Prior to Dart 2.14, metadata (annotations) were not permitted to be specified
with generic type arguments. This restriction is lifted in Dart Dart 2.14.
```dart
class C<T> {
const C();
}
@C(); // Previously permitted.
@C<int>(); // Previously an error, now permitted.
```
- Prior to Dart 2.14, generic function types were not permitted as arguments to
generic classes or functions, nor to be used as generic bounds. This
restriction is lifted in Dart 2.14.
```dart
T wrapWithLogging<T>(T f) {
if (f is void Function<T>(T x)) {
return <S>(S x) {
print("Call: f<$S>($x)");
var r = f<S>(x);
print("Return: $x");
return r;
} as T;
} // More cases here
return f;
}
void foo<T>(T x) {
print("Foo!");
}
void main() {
// Previously an error, now permitted.
var f = wrapWithLogging<void Function<T>(T)>(foo);
f<int>(3);
}
```
## 2.13.4 - 2021-06-28
This is a patch release that fixes: