Page MenuHomeFeedback Tracker

Ambiguous function call not being ambiguous
Assigned, UrgentPublic

Description

I revently stumbled uppon a weird compiler bug, where it would tell me my function call is ambiguous, even though it's not.
It seems like all functions in the class, which are overloaded are checked regardless of their name.
Yes, the call would be ambiguous, if they had the same name, but they don't

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
General
Steps To Reproduce
class AmbiguousTest {

	void Trigger(notnull Man player, string triggerName, int cooldown = 0) {
		PlayerIdentity ident = player.GetIdentity();
		Trigger(ident, triggerName, cooldown); // Error is in this line
	}
	void SetTrigger(); // Remove this line and everything will work again

	void Trigger(notnull PlayerIdentity player, string triggerName, int cooldown);
	void SetTrigger(notnull PlayerIdentity player, string triggerName, int value); // Or remove this line. It seems like it's checked for ambiguity even though it has a different name

}

Event Timeline

LBmaster created this task.Aug 16 2024, 9:18 AM
LBmaster changed Severity from None to Crash.
LBmaster changed Reproducibility from N/A to Always.
LBmaster changed Operating System from Windows 7 to Windows 11 x64.
Geez changed the task status from New to Assigned.Aug 19 2024, 11:24 AM