fork download
  1. /**
  2.  * Interfaces for input and output
  3.  */
  4. interface InputConnector(T:Comparable!T,V:Writable) {
  5. alias Comparable!T K;
  6. public void initialize();
  7. public void open();
  8. public void next(K key, V val);
  9. public void close();
  10. }
  11.  
  12. interface ReferenceConnector(K, V) {
  13. public void initialize();
  14. public void open();
  15. public V get(K key);
  16. public void close();
  17. }
  18.  
  19. interface OutputConnector {
  20. public void initialize();
  21. public void open();
  22. public void collect(Comparable key, Writable val);
  23. public void close();
  24. }
  25.  
  26. /**
  27.  * Writable Interface
  28.  */
  29. interface Writable {
  30. public Writable getInstance();
  31. public void serialize();
  32. public void deserialize();
  33. public string toString();
  34. }
  35. /**
  36.  *
  37.  */
  38. interface Comparable(T) : Writable {
  39. public bool compare();
  40. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(22): Error: interface prog.Comparable(T) is used as a type
prog.d(22): Error: cannot have parameter of type void
stdout
Standard output is empty