title: Passing a pointer to a routine expecting an array of byte
body: <p>I had code that compiled in Delphi 10.1 Berlin, but throws an error in Rio.</p>
  
  <blockquote>
    <p>"Incompatible types ByteArray and pointer.</p>
  </blockquote>
  
  <p>The routine is defined with a single ByteArray parameter where
  ByteArray is a type defined as </p>
  
  <pre><code>type ByteArray = array of byte;
  </code></pre>
  
  <p>Under 10.1 I could pass a pointer or @arrayname[0].
  Under 10.3, it gives the Incompatible error above</p>
  
  <pre><code>interface
  
  uses Windows, SysUtils, classes, Dialogs, Messages, Controls;
  
  type
    ByteArray = array of byte;
  
  procedure ArrayFunc(const P : ByteArray);
  function TestFunction;
  
  implementation
  
  procedure ArrayFunc(const P : ByteArray);
  begin    
    // code....    
  end;
  
  procedure TestFunction;    
  var g : ByteArray;
  begin    
    ArrayFunc(g); // works    
    Arrayfunc(@g[0]); // works under 10.1, not 10.3    
  end;
  
  end.
  </code></pre>