Skip to content

C compilation error in nested array declaration #23818

@Linklancien

Description

@Linklancien

Describe the bug

C compilation error

Reproduction Steps

fn main(){
	map_test := [][][]int{len: 10, init: 
		if index == 0 || index == 9{
			[][]int{len: 10, init:[1]}
		}
		else{
			[][]int{len: 10, init:
					if index == 0 || index == 9{[1]}else{[]}
				}
		}
	}
}

Expected Behavior

Suppose to create triple nest array [][][] using nested conditions

Current Behavior

C compilation error

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.9 81fd0db.a1f7213

Environment details (OS name and version, etc.)

windows, Microsoft Windows 10 Pro 19045 64-bit

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.Unit: cgenBugs/feature requests, that are related to the default C generating backend.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions