No inlay hints for struct_init* fields following a return
and the fn's return type is an optional
#1990
Labels
bug
Something isn't working
Zig Version
Zig Language Server Version
dfe958e
Client / Code Editor / Extensions
Steps to Reproduce and Observed Behavior
Can be observed for any
fn f() ?T
in the codebase thatreturn .{.x ..
,but not for fn that have an explicit error(set), ie
fn f() error{E}!?T
works.Same even if the type is explicitly specified,
Cause:
zls/src/analysis.zig
Lines 4494 to 4498 in dfe958e
resolveOptionalUnwrap
doesn't dotype_val
sE!?T
works becauseresolveUnwrapErrorUnionType
returns an 'instance' of?T
Expected Behavior
Relevant log output
No response
The text was updated successfully, but these errors were encountered: