Debian Codegraph @

src/test/06-Errors/error-return-if-no-else.ck

raw
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 ) >>>;