-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't workingongoingIssues currently actively being worked on.Issues currently actively being worked on.priority: mediumrelease-0.1Required for the first public releaseRequired for the first public release
Description
Right now, when we get the underlying type of a typedef, we panic if the typedef is not available (i.e., unbound). This happens in the function getUnderlyingType
in Translation.hs
.
However, there could be situations where this is actually the case. Consider the minimal example
typedef int foo;
extern const foo x;
If we do not select foo
, the typedef is unavailable. At the moment, we do not emit the panic because hs-bindgen
already fails earlier reporting:
$ cabal run -- hs-bindgen-cli preprocess -I ./ c.h --select-by-decl-name x
...
[Error ] [HsBindgen] [mangle-names] Missing declaration: 'foo'; did you select the declaration?
An error happend (see above)
...
However, we should still make a conscious decision if we want to keep this panic. There is also a corresponding TODO note in the code.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingongoingIssues currently actively being worked on.Issues currently actively being worked on.priority: mediumrelease-0.1Required for the first public releaseRequired for the first public release