-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.
Description
Describe the bug
https://discord.com/channels/592103645835821068/592114487759470596/1455227013509021771
Reproduction Steps
module main
fn main() {
a := map[string]?int{}
println(a['abcd'] or { none })
assert a['abcd'] or { none } == none
}Expected Behavior
assert pass
Current Behavior
code.v:5:28: error: `or` block must provide a value of type `int`, not `none`
3 | fn main() {
4 | a := map[string]?int{}
5 | println(a['abcd'] or { none })
| ~~~~
6 | assert a['abcd'] or { none } == none
7 | }
code.v:6:27: error: `or` block must provide a value of type `int`, not `none`
4 | a := map[string]?int{}
5 | println(a['abcd'] or { none })
6 | assert a['abcd'] or { none } == none
| ~~~~
7 | }Possible Solution
No response
Additional Information/Context
No response
V version
latest
Environment details (OS name and version, etc.)
all
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
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.