mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve "const" error message #1079.
This commit is contained in:
committed by
Christoffer Lerno
parent
0d1eab5c15
commit
a46bf4fbe0
8
test/test_suite/constants/assign_to_const.c3
Normal file
8
test/test_suite/constants/assign_to_const.c3
Normal file
@@ -0,0 +1,8 @@
|
||||
module test;
|
||||
import std::io;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
const NUM = 4;
|
||||
NUM += 1; // #error: You cannot assign to a constant expression
|
||||
}
|
||||
Reference in New Issue
Block a user