Version 2.15.0-206.0.dev
Merge commit '228e1062ee14ac58fe01fd2f4154438591b74898' into 'dev'
diff --git a/pkg/front_end/lib/src/base/libraries_specification.dart b/pkg/_fe_analyzer_shared/lib/src/util/libraries_specification.dart
similarity index 98%
rename from pkg/front_end/lib/src/base/libraries_specification.dart
rename to pkg/_fe_analyzer_shared/lib/src/util/libraries_specification.dart
index ad345f4..bbc64f4 100644
--- a/pkg/front_end/lib/src/base/libraries_specification.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/util/libraries_specification.dart
@@ -87,11 +87,9 @@
/// https://github.com/dart-lang/sdk/issues/28836), but for now we need to pay
/// close attention to change them consistently.
-// TODO(sigmund): move this file to a shared package.
import 'dart:convert' show jsonDecode, jsonEncode;
-import 'package:_fe_analyzer_shared/src/util/relativize.dart'
- show relativizeUri, isWindows;
+import 'relativize.dart' show relativizeUri, isWindows;
/// Contents from a single library specification file.
///
diff --git a/pkg/front_end/test/src/base/libraries_specification_test.dart b/pkg/_fe_analyzer_shared/test/util/libraries_specification_test.dart
similarity index 90%
rename from pkg/front_end/test/src/base/libraries_specification_test.dart
rename to pkg/_fe_analyzer_shared/test/util/libraries_specification_test.dart
index 033a877..10f9717 100644
--- a/pkg/front_end/test/src/base/libraries_specification_test.dart
+++ b/pkg/_fe_analyzer_shared/test/util/libraries_specification_test.dart
@@ -2,9 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// @dart = 2.9
-
-import 'package:front_end/src/base/libraries_specification.dart';
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart';
import 'package:test/test.dart';
void main() {
@@ -91,7 +89,7 @@
''';
var spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///f.json'), jsonString);
- expect(spec.specificationFor("none").libraryInfoFor("c").patches.first,
+ expect(spec.specificationFor("none").libraryInfoFor("c")!.patches.first,
Uri.parse('org-dartlang-test:///a.dart'));
jsonString = '''
@@ -108,7 +106,7 @@
''';
spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///f.json'), jsonString);
- expect(spec.specificationFor("none").libraryInfoFor("c").patches.first,
+ expect(spec.specificationFor("none").libraryInfoFor("c")!.patches.first,
Uri.parse('org-dartlang-test:///a.dart'));
});
@@ -120,7 +118,7 @@
Uri.parse('org-dartlang-test:///one/two/f.json'), jsonString);
expect(spec, isNotNull);
expect(
- spec.specificationFor('none').libraryInfoFor('c').patches, isEmpty);
+ spec.specificationFor('none').libraryInfoFor('c')!.patches, isEmpty);
});
test('library paths are resolved from spec uri', () async {
@@ -130,7 +128,7 @@
var spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///one/two/f.json'), jsonString);
- expect(spec.specificationFor('none').libraryInfoFor('c').uri,
+ expect(spec.specificationFor('none').libraryInfoFor('c')!.uri,
Uri.parse('org-dartlang-test:///one/two/c/main.dart'));
});
@@ -153,9 +151,9 @@
var spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///one/two/f.json'), jsonString);
- expect(spec.specificationFor('none').libraryInfoFor('c').patches[0],
+ expect(spec.specificationFor('none').libraryInfoFor('c')!.patches[0],
Uri.parse('org-dartlang-test:///one/a/p1.dart'));
- expect(spec.specificationFor('none').libraryInfoFor('c').patches[1],
+ expect(spec.specificationFor('none').libraryInfoFor('c')!.patches[1],
Uri.parse('org-dartlang-test:///one/a/p2.dart'));
});
@@ -192,11 +190,11 @@
var spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///one/two/f.json'), jsonString);
- expect(spec.specificationFor('vm').libraryInfoFor('foo').uri,
+ expect(spec.specificationFor('vm').libraryInfoFor('foo')!.uri,
Uri.parse('org-dartlang-test:///one/two/a/main.dart'));
- expect(spec.specificationFor('vm').libraryInfoFor('bar').uri,
+ expect(spec.specificationFor('vm').libraryInfoFor('bar')!.uri,
Uri.parse('org-dartlang-test:///one/two/b/main.dart'));
- expect(spec.specificationFor('none').libraryInfoFor('c').uri,
+ expect(spec.specificationFor('none').libraryInfoFor('c')!.uri,
Uri.parse('org-dartlang-test:///one/two/c/main.dart'));
});
@@ -242,12 +240,12 @@
''';
var spec = LibrariesSpecification.parse(
Uri.parse('org-dartlang-test:///one/two/f.json'), jsonString);
+ expect(spec.specificationFor('vm').libraryInfoFor('foo')!.isSupported,
+ false);
expect(
- spec.specificationFor('vm').libraryInfoFor('foo').isSupported, false);
+ spec.specificationFor('vm').libraryInfoFor('bar')!.isSupported, true);
expect(
- spec.specificationFor('vm').libraryInfoFor('bar').isSupported, true);
- expect(
- spec.specificationFor('vm').libraryInfoFor('baz').isSupported, true);
+ spec.specificationFor('vm').libraryInfoFor('baz')!.isSupported, true);
});
});
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index a6d6d84..6b510af 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -994,7 +994,7 @@
h3('Current registrations');
p('Showing the LSP method name and the registration params sent to the '
'client.');
- prettyJson(server.capabilitiesComputer.currentRegistrations);
+ prettyJson(server.capabilitiesComputer.currentRegistrations.toList());
}
}
diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index 7f14df8..e1b7997 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -55,8 +55,8 @@
///
/// A libraries specification file is a JSON file that describes how to map
/// `dart:*` libraries to URIs in the underlying [fileSystem]. See
- /// `package:front_end/src/base/libraries_specification.dart` for details on
- /// the format.
+ /// `package:_fe_analyzer_shared/src/util/libraries_specification.dart` for
+ /// details on the format.
///
/// If a value is not specified and `compileSdk = true`, the compiler will
/// infer at a default location under [sdkRoot], typically under
diff --git a/pkg/front_end/lib/src/api_unstable/dart2js.dart b/pkg/front_end/lib/src/api_unstable/dart2js.dart
index e811ba1..18d185d 100644
--- a/pkg/front_end/lib/src/api_unstable/dart2js.dart
+++ b/pkg/front_end/lib/src/api_unstable/dart2js.dart
@@ -12,6 +12,9 @@
import 'package:_fe_analyzer_shared/src/scanner/scanner.dart' show StringToken;
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart'
+ show LibrariesSpecification;
+
import 'package:kernel/kernel.dart' show Component;
import 'package:kernel/ast.dart' as ir;
@@ -29,8 +32,6 @@
import '../base/processed_options.dart' show ProcessedOptions;
-import '../base/libraries_specification.dart' show LibrariesSpecification;
-
import '../base/nnbd_mode.dart' show NnbdMode;
import '../fasta/compiler_context.dart' show CompilerContext;
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index de2886d..b1377c6 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -8,6 +8,12 @@
import 'package:_fe_analyzer_shared/src/messages/severity.dart' show Severity;
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart'
+ show
+ LibrariesSpecification,
+ LibrariesSpecificationException,
+ TargetLibrariesSpecification;
+
import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
import 'package:kernel/kernel.dart'
@@ -70,12 +76,6 @@
import '../fasta/uri_translator.dart' show UriTranslator;
-import 'libraries_specification.dart'
- show
- LibrariesSpecification,
- LibrariesSpecificationException,
- TargetLibrariesSpecification;
-
import 'nnbd_mode.dart';
/// All options needed for the front end implementation.
diff --git a/pkg/front_end/lib/src/fasta/uri_translator.dart b/pkg/front_end/lib/src/fasta/uri_translator.dart
index c6777ee..cf624b4 100644
--- a/pkg/front_end/lib/src/fasta/uri_translator.dart
+++ b/pkg/front_end/lib/src/fasta/uri_translator.dart
@@ -6,7 +6,8 @@
import 'package:package_config/package_config.dart';
-import '../base/libraries_specification.dart' show TargetLibrariesSpecification;
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart'
+ show TargetLibrariesSpecification;
import 'compiler_context.dart' show CompilerContext;
import 'fasta_codes.dart';
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index f6468b1..b933c35 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -14,6 +14,8 @@
show LanguageVersionToken, Token;
import 'package:_fe_analyzer_shared/src/util/colors.dart' as colors;
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart'
+ show LibraryInfo;
import 'package:_fe_analyzer_shared/src/util/options.dart';
import 'package:compiler/src/kernel/dart2js_target.dart';
import 'package:dev_compiler/src/kernel/target.dart';
@@ -41,9 +43,6 @@
import 'package:front_end/src/api_prototype/standard_file_system.dart'
show StandardFileSystem;
-import 'package:front_end/src/base/libraries_specification.dart'
- show LibraryInfo;
-
import 'package:front_end/src/base/processed_options.dart'
show ProcessedOptions;
diff --git a/pkg/front_end/test/fasta/uri_translator_test.dart b/pkg/front_end/test/fasta/uri_translator_test.dart
index d186bea..37e3564 100644
--- a/pkg/front_end/test/fasta/uri_translator_test.dart
+++ b/pkg/front_end/test/fasta/uri_translator_test.dart
@@ -4,7 +4,7 @@
// @dart = 2.9
-import 'package:front_end/src/base/libraries_specification.dart';
+import 'package:_fe_analyzer_shared/src/util/libraries_specification.dart';
import 'package:front_end/src/fasta/uri_translator.dart';
import 'package:package_config/package_config.dart';
import 'package:test/test.dart';
diff --git a/pkg/front_end/test/static_types/cfe_allowed.json b/pkg/front_end/test/static_types/cfe_allowed.json
index cd3125e..adc8898 100644
--- a/pkg/front_end/test/static_types/cfe_allowed.json
+++ b/pkg/front_end/test/static_types/cfe_allowed.json
@@ -1,5 +1,5 @@
{
- "pkg/front_end/lib/src/base/libraries_specification.dart": {
+ "pkg/_fe_analyzer_shared/lib/src/util/libraries_specification.dart": {
"Dynamic invocation of 'toList'.": 1,
"Dynamic invocation of 'map'.": 1,
"Dynamic invocation of '[]='.": 1
@@ -24,4 +24,4 @@
"pkg/_fe_analyzer_shared/lib/src/scanner/string_canonicalizer.dart": {
"Dynamic invocation of '[]'.": 2
}
-}
\ No newline at end of file
+}
diff --git a/runtime/vm/message_snapshot.cc b/runtime/vm/message_snapshot.cc
index 97196b1..4733db0 100644
--- a/runtime/vm/message_snapshot.cc
+++ b/runtime/vm/message_snapshot.cc
@@ -848,7 +848,9 @@
public:
explicit InstanceMessageDeserializationCluster(bool is_canonical)
: MessageDeserializationCluster("Instance", is_canonical),
- cls_(Class::Handle()) {}
+ cls_(Class::Handle()),
+ field_stores_(GrowableObjectArray::Handle(GrowableObjectArray::New())) {
+ }
~InstanceMessageDeserializationCluster() {}
void ReadNodes(MessageDeserializer* d) {
@@ -897,7 +899,8 @@
field ^= field_map.At(offset >> kCompressedWordSizeLog2);
ASSERT(!field.IsNull());
ASSERT(field.HostOffset() == offset);
- field.RecordStore(value);
+ field_stores_.Add(field);
+ field_stores_.Add(value);
}
#endif
}
@@ -926,11 +929,21 @@
}
return DartLibraryCalls::RehashObjectsInDartCore(d->thread(), expandos);
}
+
+ Field& field = Field::Handle(d->zone());
+ Object& value = Object::Handle(d->zone());
+ for (int i = 0; i < field_stores_.Length(); i += 2) {
+ field ^= field_stores_.At(i);
+ value = field_stores_.At(i + 1);
+ field.RecordStore(value);
+ }
+
return nullptr;
}
private:
Class& cls_;
+ GrowableObjectArray& field_stores_;
};
class TypeMessageSerializationCluster : public MessageSerializationCluster {
diff --git a/sdk/lib/_internal/fix_data.yaml b/sdk/lib/_internal/fix_data.yaml
index 7f87843..98ccd55 100644
--- a/sdk/lib/_internal/fix_data.yaml
+++ b/sdk/lib/_internal/fix_data.yaml
@@ -1307,56 +1307,6 @@
- kind: 'rename'
newName: 'gzip'
- - title: "Rename to 'read'"
- date: 2021-09-20
- element:
- uris: [ 'dart:io' ]
- field: 'READ'
- inClass: 'FileMode'
- changes:
- - kind: 'rename'
- newName: 'read'
-
- - title: "Rename to 'write'"
- date: 2021-09-20
- element:
- uris: [ 'dart:io' ]
- field: 'WRITE'
- inClass: 'FileMode'
- changes:
- - kind: 'rename'
- newName: 'write'
-
- - title: "Rename to 'append'"
- date: 2021-09-20
- element:
- uris: [ 'dart:io' ]
- field: 'APPEND'
- inClass: 'FileMode'
- changes:
- - kind: 'rename'
- newName: 'append'
-
- - title: "Rename to 'writeOnly'"
- date: 2021-09-20
- element:
- uris: [ 'dart:io' ]
- field: 'WRITE_ONLY'
- inClass: 'FileMode'
- changes:
- - kind: 'rename'
- newName: 'writeOnly'
-
- - title: "Rename to 'writeOnlyAppend'"
- date: 2021-09-20
- element:
- uris: [ 'dart:io' ]
- field: 'WRITE_ONLY_APPEND'
- inClass: 'FileMode'
- changes:
- - kind: 'rename'
- newName: 'writeOnlyAppend'
-
- title: "Rename to 'shared'"
date: 2021-09-20
element:
diff --git a/sdk/lib/_internal/vm/lib/date_patch.dart b/sdk/lib/_internal/vm/lib/date_patch.dart
index eec2bf5..249399a 100644
--- a/sdk/lib/_internal/vm/lib/date_patch.dart
+++ b/sdk/lib/_internal/vm/lib/date_patch.dart
@@ -39,7 +39,8 @@
DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
{bool isUtc: false})
: this._withValue(
- millisecondsSinceEpoch * Duration.microsecondsPerMillisecond,
+ _validateMilliseconds(millisecondsSinceEpoch) *
+ Duration.microsecondsPerMillisecond,
isUtc: isUtc);
@patch
@@ -58,6 +59,13 @@
if (isUtc == null) throw new ArgumentError();
}
+ static int _validateMilliseconds(int millisecondsSinceEpoch) =>
+ RangeError.checkValueInInterval(
+ millisecondsSinceEpoch,
+ -_maxMillisecondsSinceEpoch,
+ _maxMillisecondsSinceEpoch,
+ "millisecondsSinceEpoch");
+
@patch
DateTime._now()
: isUtc = false,
diff --git a/tests/corelib/date_time_test.dart b/tests/corelib/date_time_test.dart
index e782ca5..21859ef 100644
--- a/tests/corelib/date_time_test.dart
+++ b/tests/corelib/date_time_test.dart
@@ -1188,6 +1188,34 @@
Expect.equals("-010000-01-01T23:49:59.989979Z", d.toIso8601String());
}
+void testRegression46966() {
+ // See http://dartbug.com/46966
+ // The constructor allowed numbers larger than 100_000_000 days
+ // from epoch, contrary to documentation (and web behavior).
+
+ // Maximally allowed milliseconds on either side of epoch
+ // (±100 000 000 days).
+ var maxMilliseconds = 100000000 * 24 * 60 * 60 * 1000;
+ var maxDate = DateTime.fromMillisecondsSinceEpoch(maxMilliseconds);
+ var minDate = DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds);
+
+ // Throws if greater.
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(maxMilliseconds + 1));
+ Expect.throws(
+ () => DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds - 1));
+
+ // But also if much greater.
+ // The badMin value overflows 64-bits when multiplied by 1000.
+ var badMin = 0x20c49ba5e353f8;
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin + 1));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin - 1));
+ var badMax = double.maxFinite.toInt(); // 2^63-1 on VM, max double on JS.
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMax));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMax - 1));
+}
+
void main() {
testNow();
testMillisecondsSinceEpoch();
@@ -1203,4 +1231,5 @@
testWeekday();
testToStrings();
testIsoString();
+ testRegression46966();
}
diff --git a/tests/corelib_2/date_time_test.dart b/tests/corelib_2/date_time_test.dart
index 798fc3a..09bbecd 100644
--- a/tests/corelib_2/date_time_test.dart
+++ b/tests/corelib_2/date_time_test.dart
@@ -1190,6 +1190,34 @@
Expect.equals("-010000-01-01T23:49:59.989979Z", d.toIso8601String());
}
+void testRegression46966() {
+ // See http://dartbug.com/46966
+ // The constructor allowed numbers larger than 100_000_000 days
+ // from epoch, contrary to documentation (and web behavior).
+
+ // Maximally allowed milliseconds on either side of epoch
+ // (±100 000 000 days).
+ var maxMilliseconds = 100000000 * 24 * 60 * 60 * 1000;
+ var maxDate = DateTime.fromMillisecondsSinceEpoch(maxMilliseconds);
+ var minDate = DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds);
+
+ // Throws if greater.
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(maxMilliseconds + 1));
+ Expect.throws(
+ () => DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds - 1));
+
+ // But also if much greater.
+ // The badMin value overflows 64-bits when multiplied by 1000.
+ var badMin = 0x20c49ba5e353f8;
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin + 1));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin - 1));
+ var badMax = double.maxFinite.toInt(); // 2^63-1 on VM, max double on JS.
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMax));
+ Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMax - 1));
+}
+
void main() {
testNow();
testMillisecondsSinceEpoch();
@@ -1205,4 +1233,5 @@
testWeekday();
testToStrings();
testIsoString();
+ testRegression46966();
}
diff --git a/tests/language/vm/regress_flutter_89584_test.dart b/tests/language/vm/regress_flutter_89584_test.dart
new file mode 100644
index 0000000..7fa3a2e
--- /dev/null
+++ b/tests/language/vm/regress_flutter_89584_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This is a regression test for the bug in
+// https://github.com/flutter/flutter/issues/89584.
+// Verifies a Field::RecordStore is not done before all fields populated.
+
+// VMOptions=--no-enable-isolate-groups
+// VMOptions=--enable-isolate-groups
+
+import 'dart:isolate';
+import 'dart:typed_data';
+
+void main() async {
+ final receivePort = ReceivePort();
+ await Isolate.spawn<SendPort>(isolateEntry, receivePort.sendPort);
+ final wrapper = (await receivePort.first) as Wrapper;
+ final result = readWrapperUint8ListView(wrapper);
+ print(result);
+}
+
+const uint8ListLength = 1000000;
+
+void isolateEntry(SendPort sendPort) async {
+ final uint8list = Uint8List(uint8ListLength);
+ sendPort.send(Wrapper(
+ uint8list.buffer.asUint8List(0, uint8list.length),
+ ));
+}
+
+int readWrapperUint8ListView(Wrapper wrapper) {
+ var result = 0;
+ for (int i = 0; i < uint8ListLength; i++) {
+ result += wrapper.uint8ListView[i];
+ }
+ return result;
+}
+
+class Wrapper {
+ final Uint8List uint8ListView;
+ Wrapper(this.uint8ListView);
+}
diff --git a/tests/language_2/vm/regress_flutter_89584_test.dart b/tests/language_2/vm/regress_flutter_89584_test.dart
new file mode 100644
index 0000000..be08ce9
--- /dev/null
+++ b/tests/language_2/vm/regress_flutter_89584_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart = 2.9
+
+// This is a regression test for the bug in
+// https://github.com/flutter/flutter/issues/89584.
+// Verifies a Field::RecordStore is not done before all fields populated.
+
+// VMOptions=--no-enable-isolate-groups
+// VMOptions=--enable-isolate-groups
+
+import 'dart:isolate';
+import 'dart:typed_data';
+
+void main() async {
+ final receivePort = ReceivePort();
+ await Isolate.spawn<SendPort>(isolateEntry, receivePort.sendPort);
+ final wrapper = (await receivePort.first) as Wrapper;
+ final result = readWrapperUint8ListView(wrapper);
+ print(result);
+}
+
+const uint8ListLength = 1000000;
+
+void isolateEntry(SendPort sendPort) async {
+ final uint8list = Uint8List(uint8ListLength);
+ sendPort.send(Wrapper(
+ uint8list.buffer.asUint8List(0, uint8list.length),
+ ));
+}
+
+int readWrapperUint8ListView(Wrapper wrapper) {
+ var result = 0;
+ for (int i = 0; i < uint8ListLength; i++) {
+ result += wrapper.uint8ListView[i];
+ }
+ return result;
+}
+
+class Wrapper {
+ final Uint8List uint8ListView;
+ Wrapper(this.uint8ListView);
+}
diff --git a/tests/lib/fix_data_tests/io.dart b/tests/lib/fix_data_tests/io.dart
index 7a29704..1f582d9 100644
--- a/tests/lib/fix_data_tests/io.dart
+++ b/tests/lib/fix_data_tests/io.dart
@@ -131,11 +131,6 @@
print(ZLibOption.STRATEGY_DEFAULT);
print(ZLIB);
print(GZIP);
- print(FileMode.READ);
- print(FileMode.WRITE);
- print(FileMode.APPEND);
- print(FileMode.WRITE_ONLY);
- print(FileMode.WRITE_ONLY_APPEND);
print(FileLock.SHARED);
print(FileLock.EXCLUSIVE);
print(FileLock.BLOCKING_SHARED);
diff --git a/tests/lib/fix_data_tests/io.dart.expect b/tests/lib/fix_data_tests/io.dart.expect
index f26799a..590adfc 100644
--- a/tests/lib/fix_data_tests/io.dart.expect
+++ b/tests/lib/fix_data_tests/io.dart.expect
@@ -131,11 +131,6 @@
print(ZLibOption.strategyDefault);
print(zlib);
print(gzip);
- print(FileMode.read);
- print(FileMode.write);
- print(FileMode.append);
- print(FileMode.writeOnly);
- print(FileMode.writeOnlyAppend);
print(FileLock.shared);
print(FileLock.exclusive);
print(FileLock.blockingShared);
diff --git a/tools/VERSION b/tools/VERSION
index 936a0ee..cd48444 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 15
PATCH 0
-PRERELEASE 205
+PRERELEASE 206
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g
index 465b18a..e992711 100644
--- a/tools/spec_parser/Dart.g
+++ b/tools/spec_parser/Dart.g
@@ -4,7 +4,10 @@
// CHANGES:
//
-// v0.17 Correct `uri` to allow multi-line strings (raw and non-raw).
+// v0.18 Add support for enhanced `enum` declarations.
+//
+// v0.17 (58d917e7573c359580ade43845004dbbc62220d5) Correct `uri` to allow
+// multi-line strings (raw and non-raw).
//
// v0.16 (284695f1937c262523a9a11b9084213f889c83e0) Correct instance variable
// declaration syntax such that `covariant late final` is allowed.
@@ -484,11 +487,15 @@
;
enumType
- : ENUM typeIdentifier LBRACE enumEntry (',' enumEntry)* (',')? RBRACE
+ : ENUM typeIdentifier typeParameters? mixins? interfaces? LBRACE
+ enumEntry (',' enumEntry)* (',')?
+ (';' (metadata classMemberDefinition)*)?
+ RBRACE
;
enumEntry
- : metadata identifier
+ : metadata identifier argumentPart?
+ | metadata identifier typeArguments? '.' identifier arguments
;
typeParameter