UoY-RoboStar / robocert-textual

Textual plugin and CSP generator for RoboCert
Eclipse Public License 2.0
2 stars 0 forks source link

Enumerations aren't considered in scope resolution #134

Open MattWindsor91 opened 1 year ago

MattWindsor91 commented 1 year ago

Thomas Wright writes in of a scope resolution bug that means that this code does not validate. The problem is that the enumeration RobotAssistedDressing::NoiseLevel::High is not in scope at expression level.

It should be the case, I think, that NoiseLevel is in scope (qualified and unqualified) by virtue of being an element of the target.

MattWindsor91 commented 1 year ago

I added a workaround for this a while back, but when auditing the metamodel with Ana it's become clear that the workaround is not acceptable, and I'll need to rethink things.

The current thought I have is something like

import robochart RobotAssistedDressing

to pull all enumerations defined in RobotAssistedDressing into main scope at the package level.