Skip to content

Array mapping uses target incorrectly #1

@WizzardMaker

Description

@WizzardMaker

Mapping from one array to the other uses the target array in the range operator, without initializing that array first

//generated code:
for i0 := range target.Array { }

//desired code:
target.Array = make([]ArrayType, len(source.Array))
for i0 := range target.Array { }

It also incorrectly ignores the source type when inside the array

//generated code
for i0 := range target.Array {
  target.Array[i0] = source.Array
}

//desired code
for i0 := range target.Array {
  target.Array[i0] = source.Array[i0]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions