borrows2.js 325 B

1234567891011121314151617181920212223
  1. // testing circular borrows
  2. /**
  3. @class
  4. @borrows Bar#zop as this.my_zop
  5. */
  6. function Foo() {
  7. /** this is a zip. */
  8. this.zip = function() {}
  9. this.my_zop = new Bar().zop;
  10. }
  11. /**
  12. @class
  13. @borrows Foo#zip as this.my_zip
  14. */
  15. function Bar() {
  16. /** this is a zop. */
  17. this.zop = function() {}
  18. this.my_zip = new Foo().zip;
  19. }