mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improved error messages on missing qualifier on enum value. #2260
This commit is contained in:
16
test/test_suite/enumerations/enum_infer_err.c3
Normal file
16
test/test_suite/enumerations/enum_infer_err.c3
Normal file
@@ -0,0 +1,16 @@
|
||||
import std::io;
|
||||
|
||||
enum Foo
|
||||
{
|
||||
BAR
|
||||
}
|
||||
|
||||
fn void test()
|
||||
{
|
||||
int x = BAR; // #error: type cannot be inferred correctly,
|
||||
}
|
||||
|
||||
fn void main()
|
||||
{
|
||||
io::printn(BAR); // #error: type cannot be inferred,
|
||||
}
|
||||
Reference in New Issue
Block a user