V error when not initializing ?&Type
#19559
Labels
Bug
This tag is applied to issues which reports bugs.
Option Type
Bugs/feature requests, that are related to `?Type`.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Describe the bug
V error when not setting struct's
?&Type
field tonone
whenType
contains a&Type2
field that needs initialized.Reproduction Steps
Expected Behavior
Expected code to compile with
?&Viewport
set tonone
by default. No output.Current Behavior
With the code above:
When changing the fields to this it compiles and runs, but I get warnings about the default value being
none
already.Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.2 37e5616.2af135d
Environment details (OS name and version, etc.)
Note
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: