Page MenuHomeFeedback Tracker

NaN float as default function argument still not fixed
Assigned, NormalPublic

Description

Related to: https://feedback.bistudio.com/T171284. There I mentioned the use of nan floats as function arguments and the original bug of not being able to define a const somewhere for them was fixed, but when using it in this way, it still fails. Please also fix this use case below. It should print "nan" for the testarg too.

class EPF_Const
{
	const float FLOAT_NAN = "nan".ToFloat();
}

void testfnc(float testarg = EPF_Const.FLOAT_NAN)
{
	Print(testarg);
}

SCRIPT : float testarg = 0


When putting it directly into the args it works, so it must be related to being a re-useable const somewhere.

void testfnc(float testarg = "nan".ToFloat())
{
	Print(testarg);
}

SCRIPT : float testarg = nan

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Arkensor created this task.May 28 2023, 9:31 AM
Arkensor updated the task description. (Show Details)May 28 2023, 9:35 AM
Arkensor updated the task description. (Show Details)
Arkensor updated the task description. (Show Details)
Geez changed the task status from New to Assigned.May 29 2023, 4:49 PM