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

@derived functions appear to ignore keyword arguments #34

Open
mabokhamis opened this issue Aug 6, 2020 · 0 comments
Open

@derived functions appear to ignore keyword arguments #34

mabokhamis opened this issue Aug 6, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mabokhamis
Copy link

@dervied Salsa functions appear to silently ignore their keyword arguments. Consider the following testcase:

using Salsa

rt = Runtime()

@declare_input x(rt)::Int

set_x!(rt, 0)

@derived function f(rt::Runtime; y::Int = 0)
    return x(rt) + y
end

println(f(rt; y = 2)) // This prints 0, as if the keyword argument `y = 2` was not provided

Perhaps if keyword arguments are not supported in Salsa, we should check for them and issue errors/warnings.

@mabokhamis mabokhamis added the enhancement New feature or request label Aug 6, 2020
@mabokhamis mabokhamis assigned ghost Aug 6, 2020
@NHDaly NHDaly assigned NHDaly and unassigned NHDaly Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants