-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
area-native-interopUsed for native interop related issues, including FFI.Used for native interop related issues, including FFI.closed-duplicateClosed in favor of an existing reportClosed in favor of an existing reportlibrary-ffitriage-automationSee https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
A user reported some bugs with Pointer.fromFunction's exceptional return param: dart-lang/native#1724
There are a few different bugs here, but they're all to do with the const detection. The following all erroneously produce a "Exceptional return value must be a constant" error when passed to exceptional return:
- Negative int literals. These should just work.
- Simple enums values. These should also just work.
- An enhanced enum. This should produce a type mismatch error, but is reported as the same constness error, so the user didn't know that they were supposed to pass
dc_status_t.DC_STATUS_TIMEOUT.value. - The enhanced enum's
.valuefield doesn't work anyway.
Ben1980
Metadata
Metadata
Assignees
Labels
area-native-interopUsed for native interop related issues, including FFI.Used for native interop related issues, including FFI.closed-duplicateClosed in favor of an existing reportClosed in favor of an existing reportlibrary-ffitriage-automationSee https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)