diff options
author | Travis Finkenauer <tmfinken@gmail.com> | 2018-03-11 18:26:31 -0400 |
---|---|---|
committer | Travis Finkenauer <tmfinken@gmail.com> | 2018-03-11 18:26:31 -0400 |
commit | 7b99b2512921fd7540a0b8f9717c6e38fec376e1 (patch) | |
tree | c8223a3ab4f74af1236703a05ec5cedbdd9d4db1 /tests/headers/issue-1198-alias-rust-const-mod-enum.h | |
parent | f36f4e3e38d5a4f9c712a5bbde68403ce716dab6 (diff) |
Fix bug when enum matched multiple types
If an enum matched a pattern for rustified enum and constified module
enum, then rust code would fail to compile with "ambiguous associated
type" error. We fix the error by giving constified module enum "higher
precedence".
Fixes issue #1198
Diffstat (limited to 'tests/headers/issue-1198-alias-rust-const-mod-enum.h')
-rw-r--r-- | tests/headers/issue-1198-alias-rust-const-mod-enum.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/headers/issue-1198-alias-rust-const-mod-enum.h b/tests/headers/issue-1198-alias-rust-const-mod-enum.h new file mode 100644 index 00000000..944fac31 --- /dev/null +++ b/tests/headers/issue-1198-alias-rust-const-mod-enum.h @@ -0,0 +1,13 @@ +// bindgen-flags: --rustified-enum '.*' --constified-enum-module '.*' + +typedef enum MyDupeEnum { + A = 0, + A_alias = 0, + B, +} MyDupeEnum; + +enum MyOtherDupeEnum { + C = 0, + C_alias = 0, + D, +};
\ No newline at end of file |