Skip to content

cgen: fix auto str for fn struct member - #21825

Merged
spytheman merged 2 commits into
vlang:masterfrom
felipensp:fix_auto_str_for_fn2
Jul 9, 2024
Merged

spytheman merged 2 commits into
vlang:masterfrom
felipensp:fix_auto_str_for_fn2

Conversation

@felipensp

Copy link
Copy Markdown
Member

Fix #21823

@felipensp
felipensp marked this pull request as ready for review July 8, 2024 13:39

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work.

The CI failures are not related imho. c2v and vdoom had recent changes, that may be responsible for them.

func: implementation
}
println('${m}')
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor but do add newline in the end of file

@@ -0,0 +1,3 @@
static string main__MyStruct_str(main__MyStruct it) { return indent_main__MyStruct_str(it, 0);}
static string main__Function_str() { return _SLIT("fn (int)");}
string _t1 = main__Function_str(); No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here too

@spytheman
spytheman merged commit 494be20 into vlang:master Jul 9, 2024
@thomas-mangin

Copy link
Copy Markdown
Contributor

Thank you @felipensp

@felipensp
felipensp deleted the fix_auto_str_for_fn2 branch July 9, 2024 20:53
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.

C codegen for struct with function member has gcc generating warnings

4 participants