test(tests/lean/run): add simple overloading test

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-26 08:53:17 -07:00
parent 2d2f23cda6
commit da6e92787a

33
tests/lean/run/e6.lean Normal file
View file

@ -0,0 +1,33 @@
precedence `+`:65
namespace nat
variable nat : Type.{1}
variable add : nat → nat → nat
infixl + := add
end
namespace int
using nat (nat)
variable int : Type.{1}
variable add : int → int → int
infixl + := add
variable of_nat : nat → int
coercion of_nat
end
using int
using nat
variables n m : nat
variables i j : int
check n + m
check i + j
check i + n
check i + n + n + n + n + n + n + n + n + n + n + n +
n + n + n + n + n + n + n + n + n + n + n + n +
n + n + n + n + n + n + n + n + n + n + n + n +
n + n + n + n + n + n + n + n + n + n + n + n