Optional inference in match expression #23831
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`.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Describe the feature
This is an extension of issue #23827
Infer as possible the
match
cases for optionalsUse Case
For returning
none
we need explicity set?int(none)
Proposed Solution
Infer the
none
from?int(none)
to have this simpler form:Other Information
No response
Acknowledgements
Version used
V 0.4.9 5f5e48e
Environment details (OS name and version, etc.)
https://play.vlang.io/p/04cc0c924c
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: