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

Cannot re-export an exception #1053

Closed
ospencer opened this issue Dec 7, 2021 · 0 comments · Fixed by #1849
Closed

Cannot re-export an exception #1053

ospencer opened this issue Dec 7, 2021 · 0 comments · Fixed by #1849
Labels

Comments

@ospencer
Copy link
Member

ospencer commented Dec 7, 2021

It's not currently possible to re-export an exception in Grain as there is no syntax to do so. One might try this:

test.gr

export exception Foo

test2.gr

import { Foo } from "./test"

export Foo

and they'd be greeted with this unhelpful internal error message:

/Users/oscar/Development/grain/cli/bin/grainc.exe: internal error, uncaught exception:
                                                   Not_found

This happens because export followed by a capitalized identifier looks for a type to export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants