Template.k 362 B

123456789101112
  1. invoke {
  2. type Maybe1<T> = T | Nil
  3. assert Maybe1<Int> <=> Nil | Int
  4. assert Maybe1<Int> ~~ Maybe1<Int>
  5. assert 1 is Maybe1<Int>
  6. assert Nil is Maybe1<Int>
  7. assert 1.5 is not Maybe1<Int>
  8. assert '1' is not Maybe1<Int>
  9. assert Maybe1<(Int | String)> ~~ Maybe1<(String | Int)>
  10. assert Maybe1<(Int | String)> <=> Maybe1<(String | Int)>
  11. }