Stream: helpdesk (published)

Topic: ✔ Tracking down "multiple type declarations"


view this post on Zulip Chad Scherrer (Apr 19 2022 at 16:10):

I think I got it. I pass in named tuples for arguments, observations, and parameters. Then in the generated function, I push some lines like

:($k::$T = _pars.$k)

I thought maybe I needed to get rid of the type annotation, but I think it might work out better to make sure the variable is treated as local. So I added

    for k in keys(args)  keys(pars)  keys(data)
        push!(loader.args, :(local $k))
    end

and I think that fixes things. Thanks all for the helpful discussion :smile:

view this post on Zulip Notification Bot (Apr 19 2022 at 16:10):

Chad Scherrer has marked this topic as resolved.


Last updated: Oct 02 2023 at 04:34 UTC