test(tests/lean/run): add test showing new coercion module addresses issue #668

This commit is contained in:
Leonardo de Moura 2015-07-01 16:41:19 -07:00
parent 4ae9f3ea81
commit aa338f6002

20
tests/lean/run/668.lean Normal file
View file

@ -0,0 +1,20 @@
set_option pp.coercions true
namespace Nat
constant Nat : Type₁
constant num2Nat : num → Nat
attribute num2Nat [coercion]
check (0 : Nat)
end Nat
constant Int : Type₁
namespace Int
open Nat
constant Nat2Int : Nat → Int
attribute Nat2Int [coercion]
check (0 : Int)
end Int
open Int
check (0 : Int)