-
-
Notifications
You must be signed in to change notification settings - Fork 238
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When using @mtkmodel and @extend, the constructor does not know about the parameters of the extended system. MWE:
@mtkmodel Inner begin
@parameters begin
color[1:4] = [1.0, 0.0, 0.0, 1.0], [description = "Color of the body in animations"]
render = true, [description = "Render the joint in animations"]
end
end
@mtkmodel Outer begin
@extend () = v = Inner()
@parameters begin
radius = 0.1, [description = "Radius of the sphere in animations"]
end
end
@named test = Outer(color=[1,1,1,1])julia> @named test = Outer(color=[1,1,1,1])
ERROR: MethodError: no method matching __Outer__(; name::Symbol, color::Vector{Int64})
Closest candidates are:
__Outer__(; name, radius) got unsupported keyword argument "color"
@ Main ~/.julia/packages/ModelingToolkit/UXr3S/src/systems/model_parsing.jl:138Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working