Skip to content

cgen: checker bug; node.left_types.len < node.left.len #17214

@ghost

Description

Describe the bug

After #17205, I thought about what if I add more parenthesis and got this bug.

_ := ((print(10)))

Expected Behavior

test.v:1:3: error: assignment mismatch: expected 1 value(s) but `print()` returns 0 value(s)

Current Behavior

test.v:1:6: warning: redundant parentheses are used
    1 | _ := ((print(10)))
      |      ~~~~~~~~~~~~~
test.v:1:3: cgen error: checker bug; node.left_types.len < node.left.len
    1 | _ := ((print(10)))
      |   ~~

Reproduction Steps

Run code from Describe the bug.

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.3.3 804065a

Environment details (OS name and version, etc.)

macOS 13.0

Metadata

Metadata

Assignees

Labels

BugThis tag is applied to issues which reports bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions