SimpleAssign
s target should be StaticAssignable
, not Node
#195
Labels
good first issue
An issue that provides a good intro to working with the Myst codebase. Be helpful!
semantics.parser
Any issue relating to changing the semantics of parser code.
semantics
Generic label for semantics issues. All semantics issues should have this tag.
I'm pretty sure that
SimpleAssign
is only created when the left-hand side is aStaticAssignable
(e.g.,Var
,Const
, orUnderscore
). If the target is a pattern, then it becomes aMatchAssign
, and if it is some method chain (e.g.x.y = 2
), then it is converted into aCall
to they=
method withx
as the receiver.With that, I think that the
target
property ofSimpleAssign
nodes can be restricted fromNode
toStaticAssignable
. That guarantee is helpful when doing semantic analysis (i.e.,myst-typecheck
:) and avoids the need to downcast it whenever it is referenced.The text was updated successfully, but these errors were encountered: