v icon indicating copy to clipboard operation
v copied to clipboard

single const can hold multi-return values

Open Delta456 opened this issue 2 years ago • 0 comments

Describe the bug

A single const valued const can hold multi-return values

fn two() (int, int) {
	return 2, 3
}

const a = two()

println(a)

Expected Behavior

An error

Current Behavior

(2, 3)

Reproduction Steps

Given

Possible Solution

A checker error

Additional Information/Context

No response

V version

Latest

Environment details (OS name and version, etc.)

Windows 11 WSL 2

Delta456 avatar Feb 23 '23 18:02 Delta456