allow "unwrapped Option cannot be used in an infix expression" #23108
Labels
Feature/Enhancement Request
This issue is made to request a feature or an enhancement to an existing one.
Option Type
Bugs/feature requests, that are related to `?Type`.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Type: Specification
Everything related to the formal specification of how V should behave
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Unit: Compiler
Bugs/feature requests, that are related to the V compiler in general.
Describe the feature
This currently produces a checker error:
(
error: unwrapped Option cannot be used in an infix expression
)Use Case
Came up in Advent of Code day 9 when dealing with a
[]?int{}
.Proposed Solution
Fix the underlying cgen issue and then remove the checker error.
Other Information
No response
Acknowledgements
Version used
V 0.4.8 602b097.e32e9f7
Environment details (OS name and version, etc.)
V full version: V 0.4.8 602b097.e32e9f7
OS: macos, macOS, 15.1.1, 24B2091
Processor: 10 cpus, 64bit, little endian, Apple M4
getwd: /Users/leodev
vexe: /Users/leodev/p/v/v/v
vexe mtime: 2024-12-07 15:07:56
vroot: OK, value: /Users/leodev/p/v/v
VMODULES: OK, value: /Users/leodev/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.47.0
Git vroot status: weekly.2024.49-33-ge32e9f70 (10 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 16.0.0 (clang-1600.0.26.4)
emcc version: N/A
thirdparty/tcc status: thirdparty-macos-arm64 713692d4
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.
Huly®: V_0.6-21545
The text was updated successfully, but these errors were encountered: