Warning in editor: Unnecessary 'else' after 'return'

Hi,
I got the following warning in editor: “Unnecessary ‘else’ after ‘return’”. I tried to understand the issue and seems warning is not always displayed correctly. For reference I wrote two functions which actually do the same work. For foo1 I get the warning, however code looks to be correct.

Thanks,
Dima

it’s a harmless warning, just saying you could have left the else part and just write “return 11” without placing it in an else block.

Ok, got it now, thanks Ziv