Import enum creates wrong comparison operator for unequal (`!=`)

Issue #14 resolved
Fabio Krapohl created an issue

Example program:

let lib =
    import-c "test.c"
        """"
            typedef enum test {
                A = 0,
                B = 1,
                C = 2
            } test;
        '()

# prints true as expected:
print
    lib.A == lib.A

# also prints true:
print 
    lib.A != lib.A

# unconst doesn't help
print
    (unconst lib.A) != (unconst lib.A)

I assume, that import-c binds the wrong function to the type symbol '!= for enums

Comments (5)

  1. Log in to comment