Why array literal cannot be matched to Implicit operator

When I call something like DoSomething([2,3]), I was expecting it would be matched to
operator implicit(aData: array of Integer): Tensor;

But it does NOT. Did I miss anything? @ck @mh



Tensor = public class
  public
    constructor; 
    begin
    end;

    operator implicit(aData: array of Integer): Tensor;
    begin

    end;
  end;
  
  Test = public class
  public
    class method DoSomething(aTensor: Tensor);
    begin

    end;

    class method DoTest;
    begin
      DoSomething([2, 3]);
    end;
  end;

[ConsoleApplication1.7z|attachment](upload://mkk09U9ELCKClEaM4aj12jT9Sfx.7z) (349.0 KB)

Hrmm you’re not really missing something. The problem here is that [ 2 ,3 ] is initially typeless, there’s no implicit operator support for converting a typeless array yet. I’ll log an issue.

Thanks, logged as bugs://83847

bugs://83847 got closed with status fixed.