mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Crash when doing a type property lookup for const inline enums in some cases #2717.
This commit is contained in:
12
test/test_suite/enumerations/const_enum.c3
Normal file
12
test/test_suite/enumerations/const_enum.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
import std::io;
|
||||
|
||||
enum MyEnum : const inline CInt
|
||||
{
|
||||
FOO = 1,
|
||||
BAR = 5,
|
||||
BAZ = 9,
|
||||
}
|
||||
fn void main()
|
||||
{
|
||||
io::printn(MyEnum.lookup(2)); // #error: No method or inner struct/union 'MyEnum.lookup' found
|
||||
}
|
||||
Reference in New Issue
Block a user