2019-02-13 12:42:47 +00:00
|
|
|
// Copyright (c) 2019, 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.
|
|
|
|
//
|
|
|
|
// Dart test program for testing the --enable-ffi=false flag.
|
|
|
|
//
|
|
|
|
// VMOptions=--enable-ffi=false
|
|
|
|
|
2020-01-29 12:26:40 +00:00
|
|
|
import 'dart:ffi'; //# 01: compile-time error
|
2021-01-14 12:36:27 +00:00
|
|
|
|
2020-01-29 12:26:40 +00:00
|
|
|
import 'package:ffi/ffi.dart'; //# 01: compile-time error
|
2019-02-13 12:42:47 +00:00
|
|
|
|
|
|
|
void main() {
|
2020-01-29 12:26:40 +00:00
|
|
|
Pointer<Int8> p = //# 01: compile-time error
|
2021-01-14 12:36:27 +00:00
|
|
|
calloc(); //# 01: compile-time error
|
2020-01-29 12:26:40 +00:00
|
|
|
print(p.address); //# 01: compile-time error
|
2021-01-14 12:36:27 +00:00
|
|
|
calloc.free(p); //# 01: compile-time error
|
2019-02-13 12:42:47 +00:00
|
|
|
}
|