test(tests/lean/sec_notation2): notation nested in namespace/section/section

This commit is contained in:
Leonardo de Moura 2015-04-21 19:07:52 -07:00
parent 52e9ad1a98
commit ce153d01f9
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,36 @@
open nat
namespace foo
section
section
parameter (A : Type)
definition f (a b : A) : A := a
definition add2 (a : nat) : nat := a + 2
postfix `+.2`:100 := add2
local postfix `++2`:100 := add2
eval 3 +.2
example : 3 +.2 = 3 ++2 := rfl
end
eval 3 +.2
example : 3 +.2 = 3 ++2 := rfl -- error
end
eval 3 +.2
end foo
example : 3 +.2 = 5 := -- error
rfl
open foo
example : 3 +.2 = 5 := -- error
rfl

View file

@ -0,0 +1,5 @@
5
5
sec_notation2.lean:23:21: error: invalid expression
5
sec_notation2.lean:30:13: error: invalid expression