Replies: 1 comment 1 reply
-
We've played around with this idea as well, and in theory it's possible. It's a bit complicated once we add some level of inheritance, as then the It might be worth looking into this in the context of the planned type collection refactoring. @pluralia @montymxb your thoughts? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The inferred model from a grammar doesn't further constrain the type of the
$type
property. It is stillstring
while the$container
is constrained to the possible parents derived from the grammar.Is there a reason why:
Wouldn't work?
Especially in testing where you don't always want to construct an AST from the concrete syntax, it would make direct construction of the AST much simpler when the type would have a constraint.
Beta Was this translation helpful? Give feedback.
All reactions