v
v copied to clipboard
Multiple errors when initializing array of options
Describe the bug
-
a := [?int(none), 1] println(a)expected:
[Option(error: none), Option(1)]current:[Option(error: none), Option(error: none)] -
_ := [?int(none), none]expected: success current:
builder error: cannot convert 'extern struct IError' to 'unsigned char' -
a := []?int{len: 2, init: 1} println(a)expected:
[Option(1), Option(1)]current:[Option(error: none), Option(error: none)] -
a := []?int{len: 2, init: none} println(a)expected:
[Option(error: none), Option(error: none)]current:builder error: cannot convert 'extern struct IError' to 'unsigned char'
Expected Behavior
see above
Current Behavior
see above
Reproduction Steps
see above
https://play.vlang.io/p/68682e3e14
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.3.3 2879afa
Environment details (OS name and version, etc.)
Playground
Hello. The 3 and 4 points are already fixed in this week.