mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-17 01:45:03 +01:00
Detect unused variables
This commit is contained in:
parent
f164aad631
commit
9270f52e6b
33 changed files with 340 additions and 63 deletions
22
ui-tests/lint/unused_vars.nil
Normal file
22
ui-tests/lint/unused_vars.nil
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
//@check-pass
|
||||
|
||||
function main() = (
|
||||
let x = 0;
|
||||
let _ok = 0;
|
||||
let used = 0;
|
||||
|
||||
used;
|
||||
);
|
||||
|
||||
function x() = (
|
||||
let x = 0;
|
||||
(
|
||||
let x = 0;
|
||||
call(x);
|
||||
);
|
||||
let y = x;
|
||||
);
|
||||
|
||||
function call(_a: Int) = ;
|
||||
|
||||
function param(p: Int) = ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue