Invalid generated code when a message parameter and the instance share the same name
fungiboletus opened this issue · comments
ThingML model to reproduce the problem
thing fragment StatusMsg {
message stalled(status: Boolean)
}
thing fragment StatusProvidedPort includes StatusMsg {
provided port statusInput {
receives stalled
}
}
thing Status includes StatusProvidedPort {
statechart init default {
state default {
internal event e.statusInput?stalled guard e.status == true action print "Stalled"
}
}
}
configuration Whatever {
...
instance status:Status
...
connector otherThing.statusInput => status.statusInput
...
}
Generated code
controller.bus.on('statusInput?stalled', (status) => status.receivestalledOnstatusInput(status));
Problem
status
is not the status
instance but the status
boolean parameter. In other words, a message parameter may override the instance reference.
Are you fixing it?
It's very very... very far on my todo list. I just renamed the message
parameter.
Le ven. 16 nov. 2018 à 14:51, Brice Morin <notifications@github.com> a
écrit :
… Are you fixing it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACyrEuJCPcuVxn7ezE-KXgoxdAr63ulks5uvsLpgaJpZM4Yl_2I>
.