We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What did you do? ./v -g -o vdbg cmd/v && ./vdbg -cg testit.v && S:\vProjects\testit\testit.exe
./v -g -o vdbg cmd/v && ./vdbg -cg testit.v && S:\vProjects\testit\testit.exe
module main import os {File, open_append, Process} type Foo = string | int | f32 | File struct Svc { mut: process ?Process log ?Foo } fn Svc.init(log ?Foo) Svc{ mut svc := Svc{log: log} if svc.log != none { if svc.log is string { dump(svc.log) _ := open_append(svc.log) or {panic(err)} } } return svc } struct CSvc { Svc pub mut: log ?Foo } pub fn CSvc.init(log ?Foo) CSvc { mut c := CSvc{log: log} c.Svc = Svc.init(log) return c } fn main() { CSvc.init(none) }
What did you see?
testit.v:17:21: error: cannot use `Foo` as `string` in argument 1 to `os.open_append` 15 | if svc.log is string { 16 | dump(svc.log) 17 | _ := open_append(svc.log) or {panic(err)} | ~~~~~~~ 18 | } 19 | }
What did you expect to see?
Clean compile
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:
Connected to Huly®: V_0.6-21948
Sorry, something went wrong.
Connected to #23500
The example from #23500 compiles with latest V.
checker: fix selector nested unwrapping (fix #23519) (#23521)
9871050
Successfully merging a pull request may close this issue.
V version: V 0.4.9 5d1b90b, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg -cg testit.v && S:\vProjects\testit\testit.exe
What did you see?
What did you expect to see?
Clean compile
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: