Skip to content

Lambda with a function as parameter throws an error #52

@kloimhardt

Description

@kloimhardt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions