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

gbc cpp generates ambiguous references when a struct and enum val share a name #202

Closed
tstein opened this issue Jul 13, 2016 · 1 comment
Labels

Comments

@tstein
Copy link
Contributor

tstein commented Jul 13, 2016

When compiling a bond file containing a struct and an enum value with the same name, gbc generates C++ that makes unqualified references to that name.

For example, this bond file:

namespace conflict;
struct Foo {};
enum E { Foo; };

builds with the latest master. Trying to compile the resulting conflict_apply.cpp with clang causes a number of errors like this:

./conflict_apply.h:28:31: error: reference to 'Foo' is ambiguous
    bool Apply(const bond::To<Foo>& transform,
                              ^
./conflict_types.h:35:12: note: candidate found by name lookup is 'conflict::Foo'
    struct Foo
           ^
./conflict_types.h:97:13: note: candidate found by name lookup is 'conflict::_bond_enumerators::E::E::Foo'
            Foo
            ^
@chwarr
Copy link
Member

chwarr commented Aug 23, 2016

Bond version 4.3.0 is now live on NuGet.org. These changes are included in that version.

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

No branches or pull requests

2 participants