Skip to content

function keyword arguments default values are not generated #17

@domluna

Description

@domluna
julia> JLFunction(;name="foo", kwargs=[JLKwField(;name=:arg1, default=10)])^C

julia> kw = JLKwField(;name=:arg1, default=10, type=:Int)
arg1::Int

julia> f = JLFunction(;name="foo", kwargs=[kw])
function "foo"(; arg1::Int)
end

julia> codegen_ast(a)
:(arg1::Int)

julia> codegen_ast(f)
:(function ("foo")(; arg1::Int)
  end)

This should be arg1::Int=10. Changing 10 to a Symbol has the same result.

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