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
When defining a walker before the node, Jac throws a NameError: name 'MyWalker' is not defined, and vice versa when the node is defined before the walker. This indicates that the referenced element (either MyWalker or MyNode) is not recognized during execution.
node MyNode;
walker MyWalker{
can create with `root|MyNode entry{}
}
:node:MyNode{
can do with MyWalker entry{}
}
NameError: name 'MyWalker' is not defined
walker MyWalker;
node MyNode{
can do with MyWalker entry{}
}
:walker:MyWalker{
can create with `root|MyNode entry{}
}
NameError: name 'MyNode' is not defined
The text was updated successfully, but these errors were encountered:
I don't see this as a bug. The same would happen in any other language. The example is more of a reflection of how not to cleanly organize your code. Yes jaclang advocates for clean separation of code Implementation from Declaration but a declaration without any suggestion of it abilities or attributes is generally poor design. Even if the intention is for the declaration to be purely abstract, then why declare another object within the same file?
This is an issue that needs attentione, indeed those types in the with entry/exit should be type annotations that shouldnt create an issue, I think there must be an isinstance somewhere in the generated code that may need to be refactgored out. @Thamirawaran cna you create a pr with a simple test for it (perhaps your wn example) failing. @kugesan1105 can show you how to do this.
Describe the bug
When defining a walker before the node, Jac throws a NameError: name 'MyWalker' is not defined, and vice versa when the node is defined before the walker. This indicates that the referenced element (either MyWalker or MyNode) is not recognized during execution.
NameError: name 'MyWalker' is not defined
NameError: name 'MyNode' is not defined
The text was updated successfully, but these errors were encountered: