Open DNDEMoto opened 1 month ago
@cmnrd and @edwardalee, this looks like it should be valid code:
reactor PIController3 extends GeneralController {
# error , Accessing super class's parameters in reactor
timer t(0, control_period) # without self
reaction(startup) {=
print(f"hello")
=}
}
I suspect that the C target has the same problem.
Yes, there should be no self
.
Parameters of the superclass cannot be accessed in the sub class reactor's top-level statement. For example, the following example uses it as an argument of
timer
.Errors provided by
lfc
are as followsThis problem does not occur for access within a reaction.
This code can be executed without error