Seal typed-data types.

Change-Id: Ic20b68fc258ddbf5c007f9d357366d8a41d1f1e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192186
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
Lasse R.H. Nielsen 2021-05-05 18:04:05 +00:00 committed by commit-bot@chromium.org
parent 2efbd99c47
commit 3e9cdc5644
13 changed files with 859 additions and 26 deletions

View file

@ -14,6 +14,13 @@
daylight saving changes that are not precisely one hour.
(No change on the Web which uses the JavaScript `Date` object.)
#### `dart:typed_data`
* **BREAKING CHANGE** (https://github.com/dart-lang/sdk/issues/45115)
Most types exposed by this library can no longer be extended, implemented
or mixed-in. The affected types are `ByteBuffer`, `TypedData` and *all*
its subclasses, `Int32x4`, `Float32x4`, `Float64x2` and `Endian.
#### `dart:web_sql`
* `dart:web_sql` is marked deprecated and will be removed in an upcoming
@ -24,7 +31,6 @@
was abandoned more than 5 years ago and is not supported by most browsers.
The `dart:web_sql` library has been documented as unsupported and deprecated
for many years as well and but wasn't annotated properly until now.
### Dart VM
* **Breaking Change** [#45071][]: `Dart_NewWeakPersistentHandle`'s and
@ -5741,4 +5747,4 @@ documentation on the [Dart API site](http://api.dartlang.org).
compression.
* `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument,
which controls how it resolves `package:` URIs.
which controls how it resolves `package:` URIs.

View file

@ -11,11 +11,13 @@ import 'package:analyzer/src/dart/element/type.dart';
const Map<String, Set<String>> _nonSubtypableClassMap = {
'dart:async': _nonSubtypableDartAsyncClassNames,
'dart:core': _nonSubtypableDartCoreClassNames,
'dart:typed_data': _nonSubtypableDartTypedDataClassNames,
};
const Set<String> _nonSubtypableClassNames = {
..._nonSubtypableDartCoreClassNames,
..._nonSubtypableDartAsyncClassNames,
..._nonSubtypableDartTypedDataClassNames,
};
const Set<String> _nonSubtypableDartAsyncClassNames = {
@ -31,6 +33,46 @@ const Set<String> _nonSubtypableDartCoreClassNames = {
'String',
};
const Set<String> _nonSubtypableDartTypedDataClassNames = {
'ByteBuffer',
'ByteData',
'Endian',
'Float32List',
'Float32x4',
'Float32x4List',
'Float64List',
'Float64x2',
'Float64x2List',
'Int16List',
'Int32List',
'Int32x4',
'Int32x4List',
'Int64List',
'Int8List',
'TypedData',
'Uint16List',
'Uint32List',
'Uint64List',
'Uint8ClampedList',
'Uint8List',
'UnmodifiableByteBufferView',
'UnmodifiableByteDataView',
'UnmodifiableFloat32ListView',
'UnmodifiableFloat32x4ListView',
'UnmodifiableFloat64ListView',
'UnmodifiableFloat64x2ListView',
'UnmodifiableInt16ListView',
'UnmodifiableInt32ListView',
'UnmodifiableInt32x4ListView',
'UnmodifiableInt64ListView',
'UnmodifiableInt8ListView',
'UnmodifiableUint16ListView',
'UnmodifiableUint32ListView',
'UnmodifiableUint64ListView',
'UnmodifiableUint8ClampedListView',
'UnmodifiableUint8ListView',
};
/// Provide common functionality shared by the various TypeProvider
/// implementations.
abstract class TypeProviderBase implements TypeProvider {

View file

@ -115,8 +115,11 @@ class Dart2jsTarget extends Target {
@override
bool mayDefineRestrictedType(Uri uri) =>
uri.scheme == 'dart' &&
(uri.path == 'core' || uri.path == '_interceptors');
uri.isScheme('dart') &&
(uri.path == 'core' ||
uri.path == 'typed_data' ||
uri.path == '_interceptors' ||
uri.path == '_native_typed_data');
@override
bool allowPlatformPrivateLibraryAccess(Uri importer, Uri imported) =>

View file

@ -108,8 +108,11 @@ class DevCompilerTarget extends Target {
@override
bool mayDefineRestrictedType(Uri uri) =>
uri.scheme == 'dart' &&
(uri.path == 'core' || uri.path == '_interceptors');
uri.isScheme('dart') &&
(uri.path == 'core' ||
uri.path == 'typed_data' ||
uri.path == '_interceptors' ||
uri.path == '_native_typed_data');
/// Returns [true] if [uri] represents a test script has been whitelisted to
/// import private platform libraries.

View file

@ -11,3 +11,44 @@ const List<String> denylistedCoreClasses = [
"String",
"Null"
];
// List of special classes in dart:typed_data that can't be subclassed.
const List<String> denylistedTypedDataClasses = [
"ByteBuffer",
"ByteData",
"Endian",
"Float32List",
"Float32x4",
"Float32x4List",
"Float64List",
"Float64x2",
"Float64x2List",
"Int16List",
"Int32List",
"Int32x4",
"Int32x4List",
"Int64List",
"Int8List",
"TypedData",
"Uint16List",
"Uint32List",
"Uint64List",
"Uint8ClampedList",
"Uint8List",
"UnmodifiableByteBufferView",
"UnmodifiableByteDataView",
"UnmodifiableFloat32ListView",
"UnmodifiableFloat32x4ListView",
"UnmodifiableFloat64ListView",
"UnmodifiableFloat64x2ListView",
"UnmodifiableInt16ListView",
"UnmodifiableInt32ListView",
"UnmodifiableInt32x4ListView",
"UnmodifiableInt64ListView",
"UnmodifiableInt8ListView",
"UnmodifiableUint16ListView",
"UnmodifiableUint32ListView",
"UnmodifiableUint64ListView",
"UnmodifiableUint8ClampedListView",
"UnmodifiableUint8ListView",
];

View file

@ -85,6 +85,7 @@ abstract class Loader {
final Set<String> seenMessages = new Set<String>();
LibraryBuilder coreLibrary;
LibraryBuilder typedDataLibrary;
/// The first library that we've been asked to compile. When compiling a
/// program (aka script), this is the library that should have a main method.
@ -209,8 +210,12 @@ abstract class Loader {
packageLanguageVersionProblem, 0, noLength, library.fileUri);
}
if (uri.scheme == "dart" && uri.path == "core") {
coreLibrary = library;
if (uri.scheme == "dart") {
if (uri.path == "core") {
coreLibrary = library;
} else if (uri.path == "typed_data") {
typedDataLibrary = library;
}
}
if (library.loader != this) {
if (coreLibrary == library) {
@ -231,8 +236,8 @@ abstract class Loader {
if (coreLibrary == library) {
target.loadExtraRequiredLibraries(this);
}
if (target.backendTarget
.mayDefineRestrictedType(origin?.importUri ?? uri)) {
Uri libraryUri = origin?.importUri ?? uri;
if (target.backendTarget.mayDefineRestrictedType(libraryUri)) {
library.mayImplementRestrictedTypes = true;
}
if (uri.scheme == "dart") {

View file

@ -67,7 +67,8 @@ import '../../base/instrumentation.dart' show Instrumentation;
import '../../base/nnbd_mode.dart';
import '../denylisted_classes.dart' show denylistedCoreClasses;
import '../denylisted_classes.dart'
show denylistedCoreClasses, denylistedTypedDataClasses;
import '../builder/builder.dart';
import '../builder/class_builder.dart';
@ -805,6 +806,14 @@ class SourceLoader extends Loader {
denyListedClasses.add(coreLibrary
.lookupLocalMember(denylistedCoreClasses[i], required: true));
}
if (typedDataLibrary != null) {
for (int i = 0; i < denylistedTypedDataClasses.length; i++) {
// Allow the member to not exist. If it doesn't, nobody can extend it.
Builder member = typedDataLibrary
.lookupLocalMember(denylistedTypedDataClasses[i], required: false);
if (member != null) denyListedClasses.add(member);
}
}
// Sort the classes topologically.
Set<SourceClassBuilder> topologicallySortedClasses =

View file

@ -183,6 +183,7 @@ claim
claimed
claims
clamp
clamped
clarification
clashes
class's
@ -446,7 +447,12 @@ fishy
fishythefish
fixnum
fleshed
float32
float32x
float32x4
float64
float64x
float64x2
floitsch
flowed
flushed
@ -583,6 +589,12 @@ inspired
inst
instanceof
instantiator
int16
int32
int32x
int32x4
int64
int8
integrate
intentionally
interim
@ -1270,6 +1282,7 @@ ui
uint
uint16
uint32
uint64
uint8
umbrella
un
@ -1309,6 +1322,7 @@ universally
unlinked
unlower
unmark
unmodifiable
unneeded
unordered
unpaired

View file

@ -273,10 +273,10 @@ abstract class Target {
/// Whether a platform library may define a restricted type, such as `bool`,
/// `int`, `double`, `num`, and `String`.
///
/// By default only `dart:core` may define restricted types, but some target
/// implementations override this.
/// By default only `dart:core` and `dart:typed_data` may define restricted
/// types, but some target implementations override this.
bool mayDefineRestrictedType(Uri uri) =>
uri.scheme == 'dart' && uri.path == 'core';
uri.isScheme('dart') && (uri.path == 'core' || uri.path == 'typed_data');
/// Whether a library is allowed to import a platform private library.
///

View file

@ -95,10 +95,6 @@ class MyList<T> extends ListBase<T> {
void operator []=(int index, T value) {}
}
class MyTypedData implements TypedData {
noSuchMethod(_) {}
}
main() async {
await throwsIfMaterializeAfterSend();
await throwsIfSendMoreThanOnce();
@ -118,6 +114,4 @@ main() async {
Expect.throwsTypeError(
() => TransferableTypedData.fromList(MyList<Uint8List>()));
}
Expect.throwsArgumentError(
() => TransferableTypedData.fromList([MyTypedData()]));
}

View file

@ -95,10 +95,6 @@ class MyList<T> extends ListBase<T> {
void operator []=(int index, T value) {}
}
class MyTypedData implements TypedData {
noSuchMethod(_) {}
}
main() async {
await throwsIfMaterializeAfterSend();
await throwsIfSendMoreThanOnce();
@ -110,6 +106,4 @@ main() async {
Expect.throwsArgumentError(() => TransferableTypedData.fromList([null]));
Expect.throwsArgumentError(
() => TransferableTypedData.fromList(MyList<Uint8List>()));
Expect.throwsArgumentError(
() => TransferableTypedData.fromList([MyTypedData()]));
}

View file

@ -0,0 +1,361 @@
// 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.
import 'dart:typed_data';
abstract class CEByteBuffer extends ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIByteBuffer implements ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMByteBuffer with ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CETypedData extends TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CITypedData implements TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMTypedData with TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIByteData implements ByteData {}
// ^
// [cfe] 'ByteData' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMByteData with ByteData {}
// ^
// [cfe] 'ByteData' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt8List implements Int8List {}
// ^
// [cfe] 'Int8List' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt8List with Int8List {}
// ^
// [cfe] 'Int8List' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint8List implements Uint8List {}
// ^
// [cfe] 'Uint8List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint8List with Uint8List {}
// ^
// [cfe] 'Uint8List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class Uint8CIClampedList implements Uint8ClampedList {}
// ^
// [cfe] 'Uint8ClampedList' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class Uint8CMClampedList with Uint8ClampedList {}
// ^
// [cfe] 'Uint8ClampedList' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt16List implements Int16List {}
// ^
// [cfe] 'Int16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt16List with Int16List {}
// ^
// [cfe] 'Int16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint16List implements Uint16List {}
// ^
// [cfe] 'Uint16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint16List with Uint16List {}
// ^
// [cfe] 'Uint16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32List implements Int32List {}
// ^
// [cfe] 'Int32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32List with Int32List {}
// ^
// [cfe] 'Int32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint32List implements Uint32List {}
// ^
// [cfe] 'Uint32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint32List with Uint32List {}
// ^
// [cfe] 'Uint32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt64List implements Int64List {}
// ^
// [cfe] 'Int64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt64List with Int64List {}
// ^
// [cfe] 'Int64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint64List implements Uint64List {}
// ^
// [cfe] 'Uint64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint64List with Uint64List {}
// ^
// [cfe] 'Uint64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32List implements Float32List {}
// ^
// [cfe] 'Float32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32List with Float32List {}
// ^
// [cfe] 'Float32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64List implements Float64List {}
// ^
// [cfe] 'Float64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64List with Float64List {}
// ^
// [cfe] 'Float64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32x4List implements Int32x4List {}
// ^
// [cfe] 'Int32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32x4List with Int32x4List {}
// ^
// [cfe] 'Int32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32x4List implements Float32x4List {}
// ^
// [cfe] 'Float32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32x4List with Float32x4List {}
// ^
// [cfe] 'Float32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64x2List implements Float64x2List {}
// ^
// [cfe] 'Float64x2List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64x2List with Float64x2List {}
// ^
// [cfe] 'Float64x2List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32x4 implements Int32x4 {}
// ^
// [cfe] 'Int32x4' is restricted and can't be extended or implemented.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32x4 with Int32x4 {}
// ^
// [cfe] 'Int32x4' is restricted and can't be extended or implemented.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32x4 implements Float32x4 {}
// ^
// [cfe] 'Float32x4' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32x4 with Float32x4 {}
// ^
// [cfe] 'Float32x4' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64x2 implements Float64x2 {}
// ^
// [cfe] 'Float64x2' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64x2 with Float64x2 {}
// ^
// [cfe] 'Float64x2' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// Endian cannot be used as a superclass or mixin.
abstract class CIEndian implements Endian {}
// ^
// [cfe] 'Endian' is restricted and can't be extended or implemented.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnByteBufferView implements UnmodifiableByteBufferView {}
// ^
// [cfe] 'UnmodifiableByteBufferView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnByteDataView implements UnmodifiableByteDataView {}
// ^
// [cfe] 'UnmodifiableByteDataView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt8LV implements UnmodifiableInt8ListView {}
// ^
// [cfe] 'UnmodifiableInt8ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint8LV implements UnmodifiableUint8ListView {}
// ^
// [cfe] 'UnmodifiableUint8ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint8ClampedLV implements UnmodifiableUint8ClampedListView {}
// ^
// [cfe] 'UnmodifiableUint8ClampedListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt16LV implements UnmodifiableInt16ListView {}
// ^
// [cfe] 'UnmodifiableInt16ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint16LV implements UnmodifiableUint16ListView {}
// ^
// [cfe] 'UnmodifiableUint16ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt32LV implements UnmodifiableInt32ListView {}
// ^
// [cfe] 'UnmodifiableInt32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint32LV implements UnmodifiableUint32ListView {}
// ^
// [cfe] 'UnmodifiableUint32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt64LV implements UnmodifiableInt64ListView {}
// ^
// [cfe] 'UnmodifiableInt64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint64LV implements UnmodifiableUint64ListView {}
// ^
// [cfe] 'UnmodifiableUint64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat32LV implements UnmodifiableFloat32ListView {}
// ^
// [cfe] 'UnmodifiableFloat32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat64LV implements UnmodifiableFloat64ListView {}
// ^
// [cfe] 'UnmodifiableFloat64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt32x4LV implements UnmodifiableInt32x4ListView {}
// ^
// [cfe] 'UnmodifiableInt32x4ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat32x4LV implements UnmodifiableFloat32x4ListView {}
// ^
// [cfe] 'UnmodifiableFloat32x4ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat64x2LV implements UnmodifiableFloat64x2ListView {}
// ^
// [cfe] 'UnmodifiableFloat64x2ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE

View file

@ -0,0 +1,361 @@
// 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.
import 'dart:typed_data';
abstract class CEByteBuffer extends ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIByteBuffer implements ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMByteBuffer with ByteBuffer {}
// ^
// [cfe] 'ByteBuffer' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CETypedData extends TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CITypedData implements TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMTypedData with TypedData {}
// ^
// [cfe] 'TypedData' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIByteData implements ByteData {}
// ^
// [cfe] 'ByteData' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMByteData with ByteData {}
// ^
// [cfe] 'ByteData' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt8List implements Int8List {}
// ^
// [cfe] 'Int8List' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt8List with Int8List {}
// ^
// [cfe] 'Int8List' is restricted and can't be extended or implemented.
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint8List implements Uint8List {}
// ^
// [cfe] 'Uint8List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint8List with Uint8List {}
// ^
// [cfe] 'Uint8List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class Uint8CIClampedList implements Uint8ClampedList {}
// ^
// [cfe] 'Uint8ClampedList' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class Uint8CMClampedList with Uint8ClampedList {}
// ^
// [cfe] 'Uint8ClampedList' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt16List implements Int16List {}
// ^
// [cfe] 'Int16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt16List with Int16List {}
// ^
// [cfe] 'Int16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint16List implements Uint16List {}
// ^
// [cfe] 'Uint16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint16List with Uint16List {}
// ^
// [cfe] 'Uint16List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32List implements Int32List {}
// ^
// [cfe] 'Int32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32List with Int32List {}
// ^
// [cfe] 'Int32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint32List implements Uint32List {}
// ^
// [cfe] 'Uint32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint32List with Uint32List {}
// ^
// [cfe] 'Uint32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt64List implements Int64List {}
// ^
// [cfe] 'Int64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt64List with Int64List {}
// ^
// [cfe] 'Int64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUint64List implements Uint64List {}
// ^
// [cfe] 'Uint64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMUint64List with Uint64List {}
// ^
// [cfe] 'Uint64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32List implements Float32List {}
// ^
// [cfe] 'Float32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32List with Float32List {}
// ^
// [cfe] 'Float32List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64List implements Float64List {}
// ^
// [cfe] 'Float64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64List with Float64List {}
// ^
// [cfe] 'Float64List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32x4List implements Int32x4List {}
// ^
// [cfe] 'Int32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32x4List with Int32x4List {}
// ^
// [cfe] 'Int32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32x4List implements Float32x4List {}
// ^
// [cfe] 'Float32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32x4List with Float32x4List {}
// ^
// [cfe] 'Float32x4List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64x2List implements Float64x2List {}
// ^
// [cfe] 'Float64x2List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64x2List with Float64x2List {}
// ^
// [cfe] 'Float64x2List' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIInt32x4 implements Int32x4 {}
// ^
// [cfe] 'Int32x4' is restricted and can't be extended or implemented.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMInt32x4 with Int32x4 {}
// ^
// [cfe] 'Int32x4' is restricted and can't be extended or implemented.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat32x4 implements Float32x4 {}
// ^
// [cfe] 'Float32x4' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat32x4 with Float32x4 {}
// ^
// [cfe] 'Float32x4' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIFloat64x2 implements Float64x2 {}
// ^
// [cfe] 'Float64x2' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CMFloat64x2 with Float64x2 {}
// ^
// [cfe] 'Float64x2' is restricted and can't be extended or implemented.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
// Endian cannot be used as a superclass or mixin.
abstract class CIEndian implements Endian {}
// ^
// [cfe] 'Endian' is restricted and can't be extended or implemented.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnByteBufferView implements UnmodifiableByteBufferView {}
// ^
// [cfe] 'UnmodifiableByteBufferView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnByteDataView implements UnmodifiableByteDataView {}
// ^
// [cfe] 'UnmodifiableByteDataView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt8LV implements UnmodifiableInt8ListView {}
// ^
// [cfe] 'UnmodifiableInt8ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint8LV implements UnmodifiableUint8ListView {}
// ^
// [cfe] 'UnmodifiableUint8ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint8ClampedLV implements UnmodifiableUint8ClampedListView {}
// ^
// [cfe] 'UnmodifiableUint8ClampedListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt16LV implements UnmodifiableInt16ListView {}
// ^
// [cfe] 'UnmodifiableInt16ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint16LV implements UnmodifiableUint16ListView {}
// ^
// [cfe] 'UnmodifiableUint16ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt32LV implements UnmodifiableInt32ListView {}
// ^
// [cfe] 'UnmodifiableInt32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint32LV implements UnmodifiableUint32ListView {}
// ^
// [cfe] 'UnmodifiableUint32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt64LV implements UnmodifiableInt64ListView {}
// ^
// [cfe] 'UnmodifiableInt64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnUint64LV implements UnmodifiableUint64ListView {}
// ^
// [cfe] 'UnmodifiableUint64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat32LV implements UnmodifiableFloat32ListView {}
// ^
// [cfe] 'UnmodifiableFloat32ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat64LV implements UnmodifiableFloat64ListView {}
// ^
// [cfe] 'UnmodifiableFloat64ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnInt32x4LV implements UnmodifiableInt32x4ListView {}
// ^
// [cfe] 'UnmodifiableInt32x4ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat32x4LV implements UnmodifiableFloat32x4ListView {}
// ^
// [cfe] 'UnmodifiableFloat32x4ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE
abstract class CIUnFloat64x2LV implements UnmodifiableFloat64x2ListView {}
// ^
// [cfe] 'UnmodifiableFloat64x2ListView' is restricted and can't be extended or implemented.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE