Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth committed May 28, 2020
1 parent d77e977 commit 4572df4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions k-distribution/tests/regression-new/checkWarns/Makefile
@@ -0,0 +1,4 @@
KOMPILE_FLAGS=-w2e
KOMPILE_BACKEND=llvm

include ../../../include/kframework/ktest-fail.mak
13 changes: 13 additions & 0 deletions k-distribution/tests/regression-new/checkWarns/checkUnusedVar.k
@@ -0,0 +1,13 @@
module CHECKUNUSEDVAR-SYNTAX

endmodule

module CHECKUNUSEDVAR
imports INT

syntax KItem ::= foo(Int)

rule foo(X) => 0
rule foo(0) => !_:Int

endmodule
@@ -0,0 +1,3 @@
[Error] Compiler: Variable 'X' defined but not used.
Source(checkUnusedVar.k)
Location(10,12,10,13)

0 comments on commit 4572df4

Please sign in to comment.