Skip to content

fmt: add fn_with_mut_ref_params_keep.vv (related #21706) - #21711

Merged
spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fmt_fn_mut_ref
Jun 21, 2024
Merged

spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fmt_fn_mut_ref

Conversation

@yuyi98

@yuyi98 yuyi98 commented Jun 21, 2024

Copy link
Copy Markdown
Member

This PR add fn_with_mut_ref_params_keep.vv (related #21706).

  • fn_with_mut_ref_params_keep.vv
struct Bar {}

fn in_both_mut_ref(mut arr []&Bar, mut bar &Bar) {
	assert bar !in arr
}

fn main() {
	mut arr := []&Bar{}
	mut bar := Bar{}
	in_both_mut_ref(mut &arr, mut &bar)
}

@spytheman
spytheman merged commit 4302f86 into vlang:master Jun 21, 2024
@larpon

larpon commented Jun 21, 2024

Copy link
Copy Markdown
Contributor

@yuyi98 it is a pleasure to see you back ❤️

@yuyi98
yuyi98 deleted the fmt_fn_mut_ref branch June 22, 2024 00:56
raw-bin pushed a commit to raw-bin/v that referenced this pull request Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants