hi, i think i found a bug with a switch and return statements
asscript:
[source lang="cpp"] bool onEvent()
{
switch(1)
{
case 1:
return true;
default:
return false;
}
}[/source]
error:
objects/Controller.as (54, 2) : INFO : Compiling bool Controller::onEvent()
objects/Controller.as (55, 2) : ERR : Not all paths return a value
but that isnt true. maybe return statements are not supported in switch cases. if so this is a feature request:)
thx
switch return bug
The switch statement currently doesn't have the logic to check if all possible paths have a return statement. I'll look into implementing it.
Regards,
Andreas
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
Popular Topics
Advertisement