map access or
block behavior is inconsistent with the rest of the language
#20391
Labels
Bug
This tag is applied to issues which reports bugs.
Describe the bug
Please see the code snippets with commentary below.
Reproduction Steps
Try to compile the following code:
Expected Behavior
The program to compile successfully. This would be consistent with how
or
blocks behave in other contexts, e.g.:Current Behavior
The compiler gives an error.
Possible Solution
No response
Additional Information/Context
One of the users on Discord pointed out, I can use
or { return none }
instead of justor { none }
and it'll work fine, but the secondreturn
seems redundant.V version
V 0.4.3 e19b2dd
Environment details (OS name and version, etc.)
V full version: V 0.4.3 5b96d8d.e19b2dd
OS: macos, macOS, 14.2.1, 23C71
Processor: 11 cpus, 64bit, little endian, Apple M3 Pro
vexe mtime: 2024-01-05 00:03:27
vroot: OK
VMODULES: OK
VTMP: OK
Git version: git version 2.39.3 (Apple Git-145)
Git vroot status: weekly.2024.01.test2-1-ge19b2dd4
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.1.0.2.5)
thirdparty/tcc status: thirdparty-macos-arm64 a668e5a0
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.
The text was updated successfully, but these errors were encountered: