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

cgen: fix array map to fixed array (fix #23116) #23118

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Dec 10, 2024

This PR fix array map to fixed array (fix #23116).

  • Fix array map to fixed array.
  • Add test.
module main

type Mat4 = [16]f32

struct GameObject  {
mut:
	transform Mat4
	children []&GameObject
}

fn main() {
	mut v1 := &GameObject{}
	eprintln("children: ${v1.children.map(it.transform)}")
	assert '${v1.children.map(it.transform)}' == '[]'
}

PS D:\Test\v\tt1> v run .    
children: []

Huly®: V_0.6-21555

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman spytheman merged commit 43e27d2 into vlang:master Dec 10, 2024
72 checks passed
@yuyi98 yuyi98 deleted the fix_array_map_fixed_array branch December 10, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants