dart-sdk/tests/ffi/regress_46085_test.dart
Daco Harkes 1d38c98b69 [vm/ffi] Fix CFE crash on missing Array sizes
Closes: https://github.com/dart-lang/sdk/issues/46085

TEST=tests/ffi/regress_46085_test.dart

Change-Id: I04e05baccb6eb490ef32702677e3d5c1bb815560
Cq-Include-Trybots: luci.dart.try:vm-kernel-nnbd-linux-debug-x64-try
Fixed: 46085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201264
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-05-26 11:02:22 +00:00

19 lines
558 B
Dart

// 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:ffi";
class MyStruct extends Struct {
external Pointer<Int8> notEmpty;
@Array.multi([]) //# 01: compile-time error
external Array<Int16> a0; //# 01: compile-time error
@Array.multi([1]) //# 02: compile-time error
external Array<Array<Int16>> a1; //# 02: compile-time error
}
void main() {
MyStruct? ms = null;
}