Skip to content

Using nameof() in a static list does not compile #2469

@Zonespace27

Description

@Zonespace27
/client/can_admin_varaccess(var_name, var_value, mob/accessor)
	var/static/list/headmin_access = list(
		nameof(ckey),
		nameof(key),
		nameof(mob),
	)
	if(var_name in headmin_access)
		if(!(accessor.ckey in head_admin))
			return FALSE

	return ..()

Causes OD0404, "Unknown identifier "headmin_access""
Issue goes away if you remove the /static part. Wixoa elaborates on the bug more here

Metadata

Metadata

Assignees

No one assigned

    Labels

    CompilerInvolves the OpenDream compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions