You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f:=fn (s ?string) ?string {
return s
}
mutdata:=map[string]?string{}
// ERROR!!data= {
'name': ?string('andre')
'age': ?string('')
}
// ERROR!!// data = {// 'name': ?string('andre')// 'age': ?string(none)// }// Apparently works with windowless TCC// data = {// 'name': f('andre')// 'age': f(none)// }dump(data)
Expected Behavior
data: {
name: Option('andre')
age: Option('')
}
Current Behavior
Output:
code.v:1:1: warning: unused variable: `f`
1 | f := fn (s ?string) ?string {
| ^
2 | return s
3 | }
/tmp/v_60000/code.2308165315178286467.tmp.c:2137: error: cannot convert 'struct _option_string' to 'unsigned char *'
builder error:
==================
C error. This should never happen.
This is a compiler bug, please report it using `v bug file.v`.
https://github.com/vlang/v/issues/new/choose
You can also use #help on Discord: https://discord.gg/vlang
Exited with error status 1
Describe the bug
Code: https://vosca.dev/p/2e4ea06fa8
Expected Behavior
Current Behavior
Output:
Reproduction Steps
https://vosca.dev/p/2e4ea06fa8
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.3.4 fc4c431.45f16a2
Environment details (OS name and version, etc.)
The text was updated successfully, but these errors were encountered: