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>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c0ae9b..cb0efef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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 @@
compression.
* `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument,
- which controls how it resolves `package:` URIs.
\ No newline at end of file
+ which controls how it resolves `package:` URIs.
diff --git a/pkg/analyzer/lib/src/dart/element/type_provider.dart b/pkg/analyzer/lib/src/dart/element/type_provider.dart
index 2831cb48..dbc4a34 100644
--- a/pkg/analyzer/lib/src/dart/element/type_provider.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_provider.dart
@@ -11,11 +11,13 @@
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 @@
'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 {
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index c10c0e9..a048dea 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -115,8 +115,11 @@
@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) =>
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index 473b404..aab6be3 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -108,8 +108,11 @@
@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.
diff --git a/pkg/front_end/lib/src/fasta/denylisted_classes.dart b/pkg/front_end/lib/src/fasta/denylisted_classes.dart
index c722cbe..345ec12 100644
--- a/pkg/front_end/lib/src/fasta/denylisted_classes.dart
+++ b/pkg/front_end/lib/src/fasta/denylisted_classes.dart
@@ -11,3 +11,44 @@
"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",
+];
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index c7d3cbe..98d86e8 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -85,6 +85,7 @@
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 @@
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 @@
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") {
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 675dee4..03c4d7d 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -67,7 +67,8 @@
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 @@
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 =
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 42782a9..a1b8799 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -183,6 +183,7 @@
claimed
claims
clamp
+clamped
clarification
clashes
class's
@@ -446,7 +447,12 @@
fishythefish
fixnum
fleshed
+float32
+float32x
+float32x4
float64
+float64x
+float64x2
floitsch
flowed
flushed
@@ -583,6 +589,12 @@
inst
instanceof
instantiator
+int16
+int32
+int32x
+int32x4
+int64
+int8
integrate
intentionally
interim
@@ -1270,6 +1282,7 @@
uint
uint16
uint32
+uint64
uint8
umbrella
un
@@ -1309,6 +1322,7 @@
unlinked
unlower
unmark
+unmodifiable
unneeded
unordered
unpaired
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index 6069ec8..c84fd53 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -273,10 +273,10 @@
/// 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.
///
diff --git a/runtime/tests/vm/dart/transferable_throws_test.dart b/runtime/tests/vm/dart/transferable_throws_test.dart
index e649a86..67cba0a 100644
--- a/runtime/tests/vm/dart/transferable_throws_test.dart
+++ b/runtime/tests/vm/dart/transferable_throws_test.dart
@@ -95,10 +95,6 @@
void operator []=(int index, T value) {}
}
-class MyTypedData implements TypedData {
- noSuchMethod(_) {}
-}
-
main() async {
await throwsIfMaterializeAfterSend();
await throwsIfSendMoreThanOnce();
@@ -118,6 +114,4 @@
Expect.throwsTypeError(
() => TransferableTypedData.fromList(MyList<Uint8List>()));
}
- Expect.throwsArgumentError(
- () => TransferableTypedData.fromList([MyTypedData()]));
}
diff --git a/runtime/tests/vm/dart_2/transferable_throws_test.dart b/runtime/tests/vm/dart_2/transferable_throws_test.dart
index 7052072..95d1e09 100644
--- a/runtime/tests/vm/dart_2/transferable_throws_test.dart
+++ b/runtime/tests/vm/dart_2/transferable_throws_test.dart
@@ -95,10 +95,6 @@
void operator []=(int index, T value) {}
}
-class MyTypedData implements TypedData {
- noSuchMethod(_) {}
-}
-
main() async {
await throwsIfMaterializeAfterSend();
await throwsIfSendMoreThanOnce();
@@ -110,6 +106,4 @@
Expect.throwsArgumentError(() => TransferableTypedData.fromList([null]));
Expect.throwsArgumentError(
() => TransferableTypedData.fromList(MyList<Uint8List>()));
- Expect.throwsArgumentError(
- () => TransferableTypedData.fromList([MyTypedData()]));
}
diff --git a/tests/lib/typed_data/restricted_types_error_test.dart b/tests/lib/typed_data/restricted_types_error_test.dart
new file mode 100644
index 0000000..02b5721
--- /dev/null
+++ b/tests/lib/typed_data/restricted_types_error_test.dart
@@ -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
diff --git a/tests/lib_2/typed_data/restricted_types_error_test.dart b/tests/lib_2/typed_data/restricted_types_error_test.dart
new file mode 100644
index 0000000..02b5721
--- /dev/null
+++ b/tests/lib_2/typed_data/restricted_types_error_test.dart
@@ -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