test(tests/lean/run): add test showing new coercion module addresses issue #668
This commit is contained in:
parent
4ae9f3ea81
commit
aa338f6002
1 changed files with 20 additions and 0 deletions
20
tests/lean/run/668.lean
Normal file
20
tests/lean/run/668.lean
Normal 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)
|
Loading…
Reference in a new issue