Skip to content

Totally broken tag operator #387

Open
@Y-Less

Description

@Y-Less

Issue description:

Somehow having a custom assignment operator it is seen as unused and prevents all code generation. The code below gives:

(17) : warning 203: symbol is never used: "_:operator=(Tag:)"

And the assembly output is:

CODE 0	; 0
;program exit point
	halt 0


STKSIZE 1000

Literally nothing...

Minimal complete verifiable example (MCVE):

#pragma option -a

native printf(const str[], ...);

operator=(Tag:x)
{
	return _:x:
}

main()
{
	new a = Tag:5;
	printf("%d", a);
}

Workspace Information:

  • Compiler version:
  • Command line arguments provided (or sampctl version):
  • Operating System:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions