Advertisement

After unreachable code wrong error msg

Started by November 22, 2012 11:55 PM
1 comment, last by WitchLord 11 years, 11 months ago
Hi,

this code leads to a wrong error msg.


void dum()
{}

int dummy()
{
return 0;
dum();
//return 1;
}

output:
player.as (35, 2) : INFO : Compiling int CPlayer::dummy()
player.as (38, 3) : WARN : Unreachable code
player.as (36, 2) : ERR : Not all paths return a value

If you uncomment the last line it works. it works also with an int a; instead of a func call
Thanks. I'll look into this.

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

Advertisement
I've fixed this in revision 1482.

Besides removing the misleading 'Not all paths return a value', I also change the message 'Unreachable code' to be an error rather than a warning.

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