Advertisement

Failed assertion due to implicit cast with overloaded functions

Started by April 11, 2021 09:24 PM
2 comments, last by WitchLord 3 years, 7 months ago

Compiling the following code seems to cause a failed assertion:

void test(uint8 x) { print("test 8: " + x); }
void test(uint16 x) { print("test 16: " + x); }
void test(uint32 x) { print("test 32: " + x); }
void test(uint64 x) { print("test 64: " + x); }

void Main()
{
	test(uint8(0xFF));
	test(uint16(0xFFFF));
	test(uint32(0xFFFFFFFF));
	test(uint64(0xFFFFFFFFFFFFFFFF));
}

Ignoring the failed assertions, we do seem to get the expected result:

[   ScriptRuntime] [23:23:44]  test 8: 255
[   ScriptRuntime] [23:23:44]  test 16: 65535
[   ScriptRuntime] [23:23:44]  test 32: 4294967295
[   ScriptRuntime] [23:23:44]  test 64: 18446744073709551615

Thanks. I'll investigate this and have it fixed.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

I've fixed this in rev 2730.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement