Class.k 248 B

123456789101112131415
  1. invoke {
  2. class A {
  3. init (x: Int) {
  4. do nothing
  5. }
  6. unwrap () -> Int {
  7. return x
  8. }
  9. }
  10. assert A is Class
  11. assert A(0) is Instance
  12. assert A(0) is A
  13. assert A(0)->unwrap() == 0
  14. }