☰
Debian Codegraph
@
1.5.5.8-1
/
/
src
/
test
/
06-Errors
/
error-return-if-no-else.ck
☽
☼
src/test/06-Errors/error-return-if-no-else.ck
code
plain
raw
GPL-2.0+
2004 Ge Wang and Perry R. Cook. All rights reserved.
debian/copyright
1
// not all control paths return
2
// IF without an ELSE clause, for example
3
4
fun float foo( int v )
5
{
6
if( v == 1 )
7
{
8
return 1;
9
}
10
else if( v == 2 )
11
{
12
return 2;
13
}
14
15
// ok if uncommented
16
// return 3;
17
}
18
19
<<< foo( 1 ) >>>;