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

Cenum is not a subtype of Integer #14

Closed
melonedo opened this issue Jul 24, 2021 · 1 comment
Closed

Cenum is not a subtype of Integer #14

melonedo opened this issue Jul 24, 2021 · 1 comment

Comments

@melonedo
Copy link

With respect to JuliaLang/Downloads.jl#134, in the C language, enum is just an alias for some integer type. However, CEnum is not a subtype of Integer, and it does not support all integer methods, zero for example.

abstract type Cenum{T<:Integer} end

@Gnimuc
Copy link
Member

Gnimuc commented Jul 24, 2021

Integer is a Number, I don't think enum is a number because we usually use it in the style of a name, not a number(even though there is a number behind that name).

In practice, you could explicitly convert a Cenum to a Integer, so it doesn't matter whether Cenum is a subtype of Integer or not.

@Gnimuc Gnimuc closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants