Is ZLS supposed to give error when re-assigning const? #1914
-
Hi, with the following example: const y: u8 = 20;
y = 44; I can't see any diagnostics / errors about re-assigning the constant |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This has been a long ongoing issue with ZLS because it does not perform semantic analysis of your code yet. We currently only report syntax errors and errors that reported by |
Beta Was this translation helpful? Give feedback.
This has been a long ongoing issue with ZLS because it does not perform semantic analysis of your code yet. We currently only report syntax errors and errors that reported by
zig ast-check
. There is aenable_build_on_save
config option in ZLS that will runzig build
on your project whenever you save a document and report back any compilation errors. Until Zig can provide incremental compilation, you may have to wait a bit until diagnostics show up depending on the size of your project.