Hi! I’m running into an issue where I am trying to add perform action usages to parts, but I don’t want to declare them in the body of the part, I want the perform to reference an action usage that is defined in another package. I keep getting a yellow underline when adding the reference via a qualified name and I’m not sure what I’m doing wrong.
Hi,
this is emitted because a nested feature, i.e. a feature with an owning type, is being accessed from an unrelated type. A similar example in Python would look like
class A:
def __init__(self):
self.a = 42
a = A.a
That does not make sense, does it?
The fix is to use lhs.rhs syntax where lhs is a type, and rhs - a nested (inherited) feature. Chain as needed.
This is primarily an issue because the syntax and parsing and name resolution rules allow referencing features using qualified name syntax (::) rather than enforcing chained (member, .) accesses. And then the specification adds a bandaid validation rule that subsetted feature must be accessible.
