We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the document of official site ( http://ooc-lang.org/docs/lang/enums/ ) It says:
Or, each element can be aliased individually:
ShutdownParam: extern enum { extern(SHUT_RD) read extern(SHUT_WR) write extern(SHUT_RDWR) readWrite }
However, when I try to compile it, rock gives:
INSERT$ rock test.ooc test.ooc:2:5 error Expected enum element! extern(SHUT_RD) read ~ [FAIL]
The text was updated successfully, but these errors were encountered:
Alright so extern enums (as in, using the extern keyword with an enum) is broken, I don't think it should even be allowed right now.
extern
As for parameters that are in fact aliases, the doc is wrong, it should read:
ShutdownParam: enum { read: extern(SHUT_RD) write: extern(SHUT_WR) readWrite: extern(SHUT_RDWR) }
This, plus:
SHUT_RD : unmangled Int = 1 SHUT_WR : unmangled Int = 2 SHUT_RDWR : unmangled Int = 3
Does compile.
Sorry, something went wrong.
Extern enums aren't a thing anymore, cf. ooc-lang/rock#899
6367d40
Fix doc, re ooc-lang/rock#899
704ac30
a4cf484
No branches or pull requests
In the document of official site ( http://ooc-lang.org/docs/lang/enums/ )
It says:
Or, each element can be aliased individually:
However, when I try to compile it, rock gives:
The text was updated successfully, but these errors were encountered: