/runtime/typeinfo/ti_function.d

http://github.com/wilkie/djehuty · D · 32 lines · 16 code · 9 blank · 7 comment · 1 complexity · 190e45bdf55311c284744bde5d96f9e2 MD5 · raw file

  1. /*
  2. * ti_function.d
  3. *
  4. * This module implements the TypeInfo for function types.
  5. *
  6. */
  7. module runtime.typeinfo.ti_function;
  8. class TypeInfo_Function : TypeInfo {
  9. char[] toString() {
  10. return next.toString() ~ "()";
  11. }
  12. int opEquals(Object o) {
  13. TypeInfo_Function c;
  14. return this is o ||
  15. ((c = cast(TypeInfo_Function)o) !is null &&
  16. this.next == c.next);
  17. }
  18. // BUG: need to add the rest of the functions
  19. size_t tsize() {
  20. return 0; // no size for functions
  21. }
  22. TypeInfo next;
  23. }