Files
sdk/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.expect
T
Daco Harkes 5ca6eec782 [vm/ffi] Add Since annotations to dart:ffi
Closes: https://github.com/dart-lang/sdk/issues/48711

Change-Id: Iac0bcecdf81b02bcb2feb746aa94a1bef6caf600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240045
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-12 11:06:21 +00:00

41 lines
1.4 KiB
Plaintext

library /*isNonNullableByDefault*/;
import self as self;
import "dart:ffi" as ffi;
import "dart:core" as core;
import "dart:ffi";
import "package:ffi/ffi.dart";
class Coordinate extends ffi::Struct {
@#C1
external get x() → core::double;
@#C1
external set x(core::double #externalFieldValue) → void;
@#C1
external get y() → core::double;
@#C1
external set y(core::double #externalFieldValue) → void;
external get next() → ffi::Pointer<self::Coordinate>;
external set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void;
static factory allocate(ffi::Allocator allocator, core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
return let final self::Coordinate #t1 = ffi::StructPointer|get#ref<self::Coordinate>(ffi::AllocatorAlloc|call<self::Coordinate>(allocator)) in block {
#t1.{self::Coordinate::x} = x;
#t1.{self::Coordinate::y} = y;
#t1.{self::Coordinate::next} = next;
} =>#t1;
}
}
static method main() → dynamic {}
constants {
#C1 = ffi::Double {}
}
Constructor coverage from constants:
org-dartlang-testcase:///ffi_sample.dart:
- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:115:9)
- _NativeDouble. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:35:9)
- NativeType. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:12:9)
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)