Skip to content

Commit 8b41c5d

Browse files
authored
Fixes #1601. Expect compile-time error for elementAt() invocation on not a constant (#1603)
1 parent 21fcd48 commit 8b41c5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

LibTest/ffi/Pointer/elementAt_A02_t01.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
1515
import "dart:ffi";
1616
import "package:ffi/ffi.dart";
17-
import '../../../Utils/expect.dart';
1817

1918
void main() {
2019
Pointer<Int64> p1 = calloc<Int64>(3);
2120
try {
2221
Pointer<Void> p2 = new Pointer.fromAddress(p1.address);
23-
Expect.throws(() {
24-
p2.elementAt(1);
25-
});
22+
p2.elementAt(1);
23+
// ^^^^^^^^^^^^^^^
24+
// [analyzer] unspecified
25+
// [cfe] unspecified
2626
} finally {
2727
calloc.free(p1);
2828
}

0 commit comments

Comments
 (0)