[vm/ffi] Remove deprecated Struct.addressOf getter

This got deprecated in Dart 2.12 stable. Removing for the next release.

Closes: https://github.com/dart-lang/sdk/issues/40667

Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes 2021-02-12 09:16:02 +00:00 committed by commit-bot@chromium.org
parent 0914f10a8e
commit 65fab2397b
4 changed files with 0 additions and 13 deletions

View file

@ -58,10 +58,3 @@ abstract class Struct extends NativeType {
Struct._fromPointer(this._addressOf);
}
/// Extension on [Struct] specialized for its subtypes.
extension StructAddressOf<T extends Struct> on T {
/// Returns the address backing the reference.
@Deprecated('Hold on to the pointer backing a struct instead.')
Pointer<T> get addressOf => _addressOf as Pointer<T>;
}

View file

@ -98,8 +98,6 @@ void testTypeTest() {
final pointer = calloc<Coordinate>();
Coordinate c = pointer.ref;
Expect.isTrue(c is Struct);
// TODO(https://dartbug.com/40667): Remove support for this.
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
calloc.free(pointer);
}

View file

@ -128,8 +128,6 @@ void testTypeTest() {
final pointer = calloc<Coordinate>();
Coordinate c = pointer.ref;
Expect.isTrue(c is Struct);
// TODO(https://dartbug.com/40667): Remove support for this.
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
calloc.free(pointer);
}

View file

@ -128,8 +128,6 @@ void testTypeTest() {
final pointer = calloc<Coordinate>();
Coordinate c = pointer.ref;
Expect.isTrue(c is Struct);
// TODO(https://dartbug.com/40667): Remove support for this.
Expect.isTrue(c.addressOf is Pointer<Coordinate>);
calloc.free(pointer);
}