lean4-htt/tests/lean/run/4636.lean
2024-07-10 04:06:25 +00:00

28 lines
401 B
Text

theorem foo : True := trivial
@[deprecated] def Foo.foo : Nat := 3
set_option warningAsError true
set_option linter.all true
open Foo
/--
-/
#guard_msgs in
example : True := foo -- Should not produce warning
/--
error: `Foo.foo` has been deprecated
-/
#guard_msgs in
example : Nat := Foo.foo
namespace Foo
/--
error: `Foo.foo` has been deprecated
-/
#guard_msgs in
example : Nat := foo
end Foo