Members of Enums nested under C++ classes don't populate class namespace #1567

Open
empyrical opened this Issue Dec 28, 2016 · 0 comments

Projects

None yet

1 participant

@empyrical
Contributor

Example:

cdef extern from *:
    cdef cppclass MyClass:
        enum Enum:
            Foo
            Bar
            Baz

print(MyClass.Foo)

Fails with this error:

Error compiling Cython file:
------------------------------------------------------------
...
        enum Enum:
            Foo
            Bar
            Baz

print(MyClass.Foo)
            ^
------------------------------------------------------------

.ipython/cython/_cython_magic_ff2c51d283be3cf2d2aa2a5b824728e3.pyx:8:13: Object of type 'MyClass' has no attribute 'Foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment