parameter set multile inheritance does not work when N is > 1
Closed this issue · 2 comments
info-rchitect commented
Hi,
The following spec test will result in missing inherited parameters (:a and :b).
it "mutiple inheritance works" do
class IP4
include Origen::Model
def initialize
define_params :a do |params|
params.a = 20
params.b = 11
params.tm.a = 1
end
define_params :b do |params|
params.a = 30
params.c = 22
params.tm.b = 1
end
define_params :c1, inherit: [:a, :b] do |params|
end
define_params :c2, inherit: [:b, :a] do |params|
end
define_params :c3, inherit: [:a, :b] do |params, parents|
params.a = 40
params.d = 33
params.e = parents[:a].a + parents[:b].a
end
end
end
end
The parameter tm.a
is missing from the c3
parameter set.
info-rchitect commented
info-rchitect commented