I have a struct with an inner constructor, which calls the function “name_comparison”. I would like to splat the tuple that name_comparison returns as the arguments for the function “new”. However I get the following error “ERROR: syntax: … is not supported inside “new””. Is there some other way to do this?
struct Product
name::String
variants::Array{String}
name_elements::Array{String}
variant_elements::Array{String}
function Product(name::String, variants::Array{String})
new(name_comparison(name, variants)...)
end
end