-
Notifications
You must be signed in to change notification settings - Fork 301
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
Delegate parameter is invoked when it shouldn't be #3862
Comments
@Preston159 This seems to only affect delegates, as changing the type from type DelegateType = delegate of unit -> unit to type DelegateType = unit -> unit , and the call site from Not a fix, obviously, just a workaround if using delegates is not critical. |
@Preston159 Thanks for reporting the issue, should be resolved in the next release. |
@ncave Happy to help. Thanks for the quick resolution, both the workaround and the fix! |
I think this change caused some regressions. Trying to come up with a repro case. |
@OnurGumus Perhaps, let me know if you can find an example. The original code was done to resolve #2400. |
Description
When a function takes another function as a parameter, which in turn takes a function as a parameter, and attempts to call that function by passing in a function, Fable incorrectly calls the innermost function and passes in its return value rather than passing the function itself.
Repro code
REPL
Expected and actual results
Expected console output
del is a function
testFunc called
Actual console output
testFunc called
del is undefined
Uncaught TypeError: del is not a function
Related information
4.19.3
The text was updated successfully, but these errors were encountered: