c3lang / c3c

Compiler for the C3 language
https://c3-lang.org
GNU Lesser General Public License v3.0
2.68k stars 163 forks source link

enum.min enum.max available? #1160

Closed LukyGuyLucky closed 7 months ago

LukyGuyLucky commented 7 months ago

From C3 handbook:

enum State : uint { START, STOP, }

const uint LOWEST = State.min; // Error: No method or inner struct/union 'State.min' found. const uint HIGHEST = State.max; //Error: No method or inner struct/union 'State.max' found.

Is this in the roadmap but not implemented in current version or a bug?

lerno commented 7 months ago

Hmm.. I think there used to be meaning to those when there were C style enums, but these days there's no meaning, since "min" would always be 0, and "max" the number of enums - 1

LukyGuyLucky commented 7 months ago

Well noted with thanks.

lerno commented 7 months ago

I've updated the docs as well.