mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: check that functions return in all if/else branches
This commit is contained in:

committed by
Alexander Medvednikov

parent
28147c0930
commit
61983a6799
@ -489,8 +489,7 @@ pub fn (c Complex) acsch() Complex {
|
||||
)
|
||||
.divide(c)
|
||||
.ln()
|
||||
}
|
||||
if(c.re > 0) {
|
||||
} else {
|
||||
return one.add(
|
||||
one.add(
|
||||
c.pow(2)
|
||||
|
@ -19,6 +19,7 @@ pub fn fraction(n i64, d i64) Fraction{
|
||||
}
|
||||
else {
|
||||
panic('Denominator cannot be zero')
|
||||
return Fraction{} // TODO remove return
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user