Skip to content

Commit 410291f

Browse files
dcharkesCommit Queue
authored and
Commit Queue
committed
[ffi] AbiSpecificIntegerArray explicit type argument
This makes it explicit on the call site what the integer is, simplifying follow up CLs. TEST=tests/ffi CoreLibraryReviewExempt: implementation change only. Bug: #54739 Change-Id: Ib5bc09f4194e9103cf42eb3851b2308553fd8990 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360640 Commit-Queue: Daco Harkes <[email protected]> Reviewed-by: Tess Strickland <[email protected]>
1 parent 769cfb3 commit 410291f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk/lib/_internal/vm/lib/ffi_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ extension UnionArray<T extends Union> on Array<T> {
13801380
}
13811381

13821382
@patch
1383-
extension AbiSpecificIntegerArray on Array<AbiSpecificInteger> {
1383+
extension AbiSpecificIntegerArray<T extends AbiSpecificInteger> on Array<T> {
13841384
@patch
13851385
int operator [](int index) {
13861386
throw ArgumentError(

sdk/lib/ffi/ffi.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ extension ArrayArray<T extends NativeType> on Array<Array<T>> {
14651465

14661466
/// Bounds checking indexing methods on [Array]s of [AbiSpecificInteger].
14671467
@Since('2.16')
1468-
extension AbiSpecificIntegerArray on Array<AbiSpecificInteger> {
1468+
extension AbiSpecificIntegerArray<T extends AbiSpecificInteger> on Array<T> {
14691469
external int operator [](int index);
14701470

14711471
external void operator []=(int index, int value);

0 commit comments

Comments
 (0)