Skip to content

Incorrect default value JSON dictionary entry for member arrays of arrays #925

@zimri-leisher

Description

@zimri-leisher

I believe I have found an issue with the JSON dictionary generated by this FPP:

        struct ExampleStruct {
            arrayMemberU32: [2] U32Array,
        }

Where U32Array is:

array U32Array = [5] U32

That generates this JSON:

    {
      "kind" : "struct",
      "qualifiedName" : "ExampleStruct",
      "members" : {
        "ex" : {
          "type" : {
            "name" : "U32Array",
            "kind" : "qualifiedIdentifier"
          },
          "index" : 0,
          "size" : 2
        }
      },
      "default" : {
        "ex" : [
          0,
          0,
          0,
          0,
          0
        ]
      }
    },

Notice that the default value does not match the actual structure of the member. Instead, I expect something like:

      "default" : {
        "ex" : [[
          0,
          0,
          0,
          0,
          0
        ], [
          0,
          0,
          0,
          0,
          0
        ]]
      }

Metadata

Metadata

Assignees

Labels

code generationIssues related to code generation

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions