Private.k 290 B

12345678910111213141516
  1. invoke {
  2. class A {
  3. init (x: Int) {
  4. do nothing
  5. }
  6. private f (y: Int) -> Int {
  7. return x * y
  8. }
  9. calc (y: Int) -> Int {
  10. assert f is Overload
  11. return f(y)
  12. }
  13. }
  14. assert A(4) -> calc(5) == 20
  15. }