Skip to content

[vm/ffi] FfiNative optional arguments should be compile-time error #47169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dcharkes opened this issue Sep 9, 2021 · 0 comments
Closed

[vm/ffi] FfiNative optional arguments should be compile-time error #47169

dcharkes opened this issue Sep 9, 2021 · 0 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Sep 9, 2021

Optional arguments (positional and named) do not create compile-time errors:

@FfiNative<Double Function({Double foo})>('Math_sqrt', isLeaf:true)
external double _square_root(double x);

@FfiNative<Double Function([Double foo])>('Math_sqrt', isLeaf:true)
external double _square_root(double x);
@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels Sep 9, 2021
@dcharkes dcharkes assigned ghost Sep 9, 2021
copybara-service bot pushed a commit that referenced this issue Mar 18, 2022
Optional arguments (positional and named) in @FfiNative
annotations are not meaningful, and should result in a
compile-time error.

TEST=tests/ffi/ffi_native_test.dart
Bug: #47169
Change-Id: I8896e6a43f9399b537e6ee7c7a0e2857a370203f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232622
Reviewed-by: Daco Harkes <[email protected]>
Reviewed-by: Chloe Stefantsova <[email protected]>
Commit-Queue: Clement Skau <[email protected]>
@ghost ghost closed this as completed May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi
Projects
None yet
Development

No branches or pull requests

1 participant