dart-sdk/tests/ffi/regress_44985_test.dart
Daco Harkes c7ca192d6e [cfe/ffi] Fix Struct invalid field crashes
Closes: https://github.com/dart-lang/sdk/issues/44985
Closes: https://github.com/dart-lang/sdk/issues/44986

TEST=tests/ffi(_2)/regress_4498[56]_test.dart

Change-Id: Ia21e6e41de14ef61843ce9bff0608a9235f08936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185860
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-19 15:50:44 +00:00

16 lines
377 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 S2 extends Struct {
external Pointer<Int8> notEmpty;
external Struct? s; //# 01: compile-time error
}
void main() {
S2? s2;
}