You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
There are no analyzer errors in the project. When I run the file I get the error message:
$dart run example/minimization_example.dart
lib/src/minimize.dart:27:46: Error: fromFunction expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context.
pFun.ref.function = Pointer.fromFunction(fn, 0.0);
Hi,
I'm getting an error when it think I shouldn't.
See for example https://github.com/thumbert/gsl_dart/blob/main/example/minimization_example.dart line 9.
There are no analyzer errors in the project. When I run the file I get the error message:
How come
Minimizer.fn = (x, params) => cos(x) + 1.0;
is not a static function? If I hard code it directly in https://github.com/thumbert/gsl_dart/blob/main/lib/src/minimize.dart line 44, the program runs fine.Thanks,
T
The text was updated successfully, but these errors were encountered: