grain icon indicating copy to clipboard operation
grain copied to clipboard

Cannot re-export an exception

Open ospencer opened this issue 4 years ago • 0 comments

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.

ospencer avatar Dec 07 '21 22:12 ospencer