title: How can an abstract implement an interface?
body: <p>I have a common interface that describes access to the output stream like this:</p>
  
  <pre><code>interface IOutput {
      function writeInteger(aValue:Int):Void;
  }
  </code></pre>
  
  <p>And I have an abstract implementation of this interface based on standard <code>haxe.io.BytesOutput</code> class:</p>
  
  <pre><code>abstract COutput(BytesOutput) from BytesOutput {
      public inline function new(aData:BytesOutput) {
          this = aData;
      }
      public inline function writeInteger(aValue:Int):Void {
          this.writeInt32(aValue);
      }
  }
  </code></pre>
  
  <p>Though this abstract is truly implementing interface described above there's no direct reference to interface and when I'm trying to use it like this:</p>
  
  <pre><code>class Main {
      public static function out(aOutput:IOutput) {
          aOutput.writeInteger(0);
      }
      public static function main() {
          var output:COutput = new BytesOutput();
          out(output); // type error
      }
  }
  </code></pre>
  
  <p>Compiler throws an error: <code>COutput should be IOutput</code>. I can solve this problem only through using common class that wraps <code>BytesOutput</code> and implements <code>IOutput</code>.</p>
  
  <p>My question is how to show the Haxe compiler that the abstract implements the interface.</p>