Skip to content
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

Lambda with a function as parameter throws an error #52

Open
kloimhardt opened this issue Jul 28, 2023 · 0 comments
Open

Lambda with a function as parameter throws an error #52

kloimhardt opened this issue Jul 28, 2023 · 0 comments

Comments

@kloimhardt
Copy link

I create inctest.clj with the following content

(println ((fn [f] (f 0)) inc))

When compiling, an error occurs:

$ g++ -std=c++11 -pthread inctest.cpp
inctest.cpp:2812:40: error: 'inc' does not refer to a value
          run(println(),run(FN__4519(),inc)); 
                                       ^
inctest.cpp:2685:24: note: declared here
                 class inc final : public lambda_i{

Note: replacing inc with (identity inc) works and prints the number 1 as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant