Skip to content

$for fails for generic alias enums #25249

@Delta456

Description

@Delta456

Describe the bug

enum Stuff {
	a
	b
}

type StuffAlias = Stuff

fn do_generic[T](t T) {
	$for value in T.values {
		
	}
}

fn main() {
	do_generic(StuffAlias.a)
}

Reproduction Steps

Run this program

Expected Behavior

Compilation

Current Behavior

C error

Possible Solution

Fix in the cgen stage

Additional Information/Context

No response

V version

Not related

Environment details (OS name and version, etc.)

Not related

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

Labels

BugThis tag is applied to issues which reports bugs.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions