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 sumtype field naming #21527

Merged
merged 3 commits into from
May 20, 2024
Merged

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented May 18, 2024

Fix #21519

struct Foo {
	do fn () = unsafe { nil }
}

struct Foo2 {
	do fn () = unsafe { nil }
}

type CallAlias = Foo | Foo2;

fn get() CallAlias {
	return Foo {
		do: fn () {
			println('cool');
		}
	}
}

fn main() {
	a := get().do
	a()
}

@felipensp felipensp marked this pull request as ready for review May 19, 2024 20:21
@spytheman spytheman merged commit cfd23f9 into vlang:master May 20, 2024
69 checks passed
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 error when compiling code
2 participants