lean4-htt/tests/lean/warningAsError.lean
2022-08-06 09:25:09 -07:00

13 lines
217 B
Text

def f (x : Nat) := x + 1
@[deprecated f]
def g (x : Nat) := x + 1
#eval g 0 -- warning
set_option warningAsError true
#eval g 0 -- error
set_option linter.unusedVariables true
def h (unused : Nat) := 0 -- error