Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair event initiators not type checked #2807

Open
joeseibel opened this issue May 25, 2022 · 0 comments
Open

Repair event initiators not type checked #2807

joeseibel opened this issue May 25, 2022 · 0 comments

Comments

@joeseibel
Copy link
Contributor

Repair events and recover events both have a when clause which can refer to event initiators. In the grammar and meta-model, these are references to NamedElement objects and the scope provider adds all members of the classifier to the scope. Type checking is performed by the validator and ensures that the reference can only be to a ModeTransition, Port, or InternalFeature.

This validation is checked for RecoverEvent, but not RepairEvent. It looks like Peter wanted the validator to check both recover and repair, but only recover ended up getting validated.

Validation occurs in the method checkRecoverEventTriggerType(RecoverEvent) which is called by caseRecoverEvent(RecoverEvent) and caseRepairEvent(RecoverEvent). As you can see, both caseRecoverEvent and caseRepairEvent take a RecoverEvent as a parameter. This results in RecoverEvent being validated twice and RepairEvent not being evaluated.

The method caseRepairEvent(RecoverEvent) should be changed to take a RepairEvent as a parameter and checkRecoverEventTriggerType should be updated to perform type checking on both RecoverEvent and RepairEvent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant