Improve "const" error message #1079.

This commit is contained in:
Christoffer Lerno
2023-11-22 18:35:29 +01:00
committed by Christoffer Lerno
parent 0d1eab5c15
commit a46bf4fbe0
6 changed files with 27 additions and 22 deletions

View 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
}