-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers

Description
In old salsa this was supported, but in the new v2 API it's not:
julia> rt = Runtime()
Salsa.Runtime(Salsa.DefaultStorage(0, ...))
julia> @declare_input x(rt)::Int
(x, set_x!, delete_x!)
julia> set_x!(rt, 2.0)
ERROR: MethodError: no method matching set_x!(::Salsa._TopLevelRuntime{Salsa.EmptyContext,Salsa._DefaultSalsaStorage.DefaultStorage}, ::Float64)
Closest candidates are:
set_x!(::Any, ::Int64) at /Users/nathandaly/.julia/dev/Salsa/src/Salsa.jl:773
Stacktrace:
[1] top-level scope at REPL[34]:1
julia> @declare_input a(rt)::Vector{Int}
(a, set_a!, delete_a!)
julia> set_a!(rt, [])
ERROR: MethodError: no method matching set_a!(::Salsa._TopLevelRuntime{Salsa.EmptyContext,Salsa._DefaultSalsaStorage.DefaultStorage}, ::Array{Any,1})
Closest candidates are:
set_a!(::Any, ::Array{Int64,1}) at /Users/nathandaly/.julia/dev/Salsa/src/Salsa.jl:773
Stacktrace:
[1] top-level scope at REPL[41]:1
julia>
This should be very simple; I think we just need to call convert(T, v)
in the generated setters. :)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers