Announcement

Collapse
No announcement yet.

[CLOSED] [#2401] [16.0.0] Multidimensional arrays cannot be initialized without the "new" keyword

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CLOSED] [#2401] [16.0.0] Multidimensional arrays cannot be initialized without the "new" keyword

    http://deck.net/0e62f9d8d7906bc36c4d0dbcaa76526f

    The very short Deck.NET code linked above illustrates the issue. Both lines are valid C#, but one version produces a JavaScript run-time error. Obviously, the workaround is not too big a deal, though, thankfully.

    // This works:
    double[,] vals = new double[,] {{1,2},{3,4}};
    
    // This does NOT work:
    //double[,] vals = {{1,2},{3,4}};
    
    Console.WriteLine(vals[0,0]);

  • #2
    Hi max46145 – Very interesting find. Thanks for bringing this to our attention.

    I have reproduced the issue.

    https://dotnetfiddle.net/rwMNPR

    We will investigate further and fix.

    Issue #2401 has been created to track this defect.
    Last edited by geoffrey.mcgill; 2017-02-16 @ 03:59 PM.

    Comment


    • #3
      Fix for issue #2401 merged into master branch and will be included in the next Bridge.NET release.

      Comment

      Working...
      X