You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In its current state, it's valid. However, if you uncomment Indirect it no longer matches (it inherits the hasMyMixin trait, but that fails to validate on Indirect due to the mixin being transitive).
Would it make sense to expand the mixin relationship, or provide a recursive variant of -[...]->? Perhaps a "forward directed recursive neighbor" syntax, like -[...]~>?
Is there a better, existing way to do what I'm looking for? (without resorting to Java)
The text was updated successfully, but these errors were encountered:
kubukoz
changed the title
Recursive mixin check?
Selectors: recursive mixin check?
Apr 4, 2024
Maybe we could add a synthetic “transitiveMixin” relationship available to selectors which includes direct and transitive mixins. Or maybe a :hasMixin(a, c, c) function that returns true if all mixins are present on a shape. I like the relationship but we’d need to see how disruptive it is vs a function.
Hi! I was wondering if there's a way to write a selector that checks if the given shape has a mixin... but checking recursively.
For example, consider this model:
In its current state, it's valid. However, if you uncomment
Indirect
it no longer matches (it inherits thehasMyMixin
trait, but that fails to validate onIndirect
due to the mixin being transitive).Would it make sense to expand the
mixin
relationship, or provide a recursive variant of-[...]->
? Perhaps a "forward directed recursive neighbor" syntax, like-[...]~>
?Is there a better, existing way to do what I'm looking for? (without resorting to Java)
The text was updated successfully, but these errors were encountered: