Version 3.3.0-188.0.dev
Merge fc4b352f2d282e3285f34b8a0c43e476c4461ace into dev
diff --git a/DEPS b/DEPS
index 21c119f..7ee0c84 100644
--- a/DEPS
+++ b/DEPS
@@ -55,7 +55,7 @@
# co19 is a cipd package automatically generated for each co19 commit.
# Use tests/co19/update.sh to update this hash.
- "co19_rev": "85c868a325bc92f4e743958077ad0ad2eb58c81f",
+ "co19_rev": "2ba55b45d85fece505a503dd12cf1c708825b74f",
# The internal benchmarks to use. See go/dart-benchmarks-internal
"benchmarks_internal_rev": "f048a4a853e3062056d39c3db100acdde42f16d6",
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 95f3896..c6151255 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -14,9 +14,9 @@
import '../compiler_api.dart' as api;
import 'commandline_options.dart';
import 'common/ram_usage.dart';
+import 'compiler.dart' as defaultCompiler show Compiler;
import 'io/mapped_file.dart';
import 'options.dart' show CompilerOptions, Dart2JSStage, FeatureOptions;
-import 'compiler.dart' as defaultCompiler show Compiler;
import 'source_file_provider.dart';
import 'util/command_line.dart';
import 'util/util.dart' show stackTraceFilePrefix;
@@ -982,7 +982,8 @@
-O2 Safe production-oriented optimizations (like minification).
-O3 Potentially unsafe optimizations (see -h -v for details).
-O4 More agressive unsafe optimizations (see -h -v for details).
- ''');
+'''
+ .trim());
}
void verboseHelp() {
diff --git a/pkg/dart2wasm/lib/translator.dart b/pkg/dart2wasm/lib/translator.dart
index 79c834f..3ae6492 100644
--- a/pkg/dart2wasm/lib/translator.dart
+++ b/pkg/dart2wasm/lib/translator.dart
@@ -570,7 +570,7 @@
}
if (type is TypeParameterType) {
return translateStorageType(nullable
- ? type.bound.withDeclaredNullability(type.nullability)
+ ? type.bound.withDeclaredNullability(Nullability.nullable)
: type.bound);
}
if (type is IntersectionType) {
diff --git a/sdk/lib/_internal/wasm/lib/list.dart b/sdk/lib/_internal/wasm/lib/list.dart
index 6725d84..6b6009a 100644
--- a/sdk/lib/_internal/wasm/lib/list.dart
+++ b/sdk/lib/_internal/wasm/lib/list.dart
@@ -23,7 +23,9 @@
_ListBase._withData(this._length, this._data);
E operator [](int index) {
- IndexError.check(index, _length, indexable: this, name: "[]");
+ if (WasmI64.fromInt(_length).leU(WasmI64.fromInt(index))) {
+ throw IndexError.withLength(index, length, name: "[]");
+ }
return unsafeCast(_data.read(index));
}
@@ -58,7 +60,9 @@
: super._withData(length, data);
void operator []=(int index, E value) {
- IndexError.check(index, _length, indexable: this, name: "[]=");
+ if (WasmI64.fromInt(_length).leU(WasmI64.fromInt(index))) {
+ throw IndexError.withLength(index, length, name: "[]=");
+ }
_data.write(index, value);
}
diff --git a/tests/language/extension_type/regress_53968_test.dart b/tests/language/extension_type/regress_53968_test.dart
new file mode 100644
index 0000000..0122c9b
--- /dev/null
+++ b/tests/language/extension_type/regress_53968_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2023, 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.
+
+// SharedOptions=--enable-experiment=inline-class
+
+// Regression check for https://dartbug.com/53968
+
+extension type A(int a) {}
+
+T returnA<T extends A?>() {
+ return null as T;
+}
+
+void main() {
+ returnA();
+}
diff --git a/tools/VERSION b/tools/VERSION
index 1d77521..14c0937 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 3
MINOR 3
PATCH 0
-PRERELEASE 187
+PRERELEASE 188
PRERELEASE_PATCH 0