Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be an error to import anywhere besides the top level #4432

Open
jtran opened this issue Nov 8, 2024 · 0 comments
Open

Should be an error to import anywhere besides the top level #4432

jtran opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working kcl Language and compiler features

Comments

@jtran
Copy link
Collaborator

jtran commented Nov 8, 2024

It should be a parse error to have an import statement anywhere besides the top level. This needs parser restructuring to track the context of a "function body".

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kcl Language and compiler features
Projects
None yet
Development

No branches or pull requests

2 participants