Skip to content

Multi-Dimensional Compile-Time arrays cannot be changed through subscript #3509

Description

@nonnorm

It seems like compile-time multi-dimensional arrays aren't being handled properly. Any updates made through a subscript assign are not being written properly.
Code:

uint[1][1] $multi_dim_arr = {{}};
$multi_dim_arr = {{2026}};
$multi_dim_arr[0][0] = 1234;
$echo $multi_dim_arr;
$echo $multi_dim_arr[0][0];

uint[1] $single_dim_arr = {};
$single_dim_arr[0] = 1234;
$echo $single_dim_arr;
$echo $single_dim_arr[0];

Output:

c3c: { { 2026 } }
c3c: 2026
c3c: { [0] = 1234 }
c3c: 1234

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions