Skip to content
New issue

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

match c generation is wrong #16554

Closed
danieldaeschle opened this issue Nov 29, 2022 · 2 comments · Fixed by #16555 or #16616
Closed

match c generation is wrong #16554

danieldaeschle opened this issue Nov 29, 2022 · 2 comments · Fixed by #16555 or #16616
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@danieldaeschle
Copy link
Member

Describe the bug

match c generation is wrong.

Expected Behavior

It should print

false
true

Current Behavior

It prints

false
false

Reproduction Steps

fn main() {
	mut a := true
	b := a && match true {
		true {
			a = false
			true
		}
		false {
			false
		}
	}
	println(a)
	println(b)
}

Possible Solution

Same as here: #11182

Additional Information/Context

No response

V version

0.3.2

Environment details (OS name and version, etc.)

Windows

@danieldaeschle danieldaeschle added the Bug This tag is applied to issues which reports bugs. label Nov 29, 2022
@danieldaeschle
Copy link
Member Author

@yuyi98

@yuyi98
Copy link
Member

yuyi98 commented Nov 29, 2022

Thanks ! I'll try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
2 participants