multiple return statements cause missing postcondition validation
Reported by me (at andresteingress) | April 11th, 2011 @ 09:29 PM | in 1.2.2
class BetterAccount extends Account {
BigDecimal withdraw( BigDecimal amount )
{
if ((balance + frame) < amount) {
return 0.0
}
balance -= amount
return amount
}
BigDecimal getFrame() {
return 100.0
}
}
Comments and changes to this ticket
-
me (at andresteingress) April 14th, 2011 @ 11:07 AM
(from [3a5962765b6baf077e0395beffeac5fabdba51fb]) multiple return statements cause missing postcondition validation [#19] https://github.com/andresteingress/gcontracts/commit/3a5962765b6baf...
-
me (at andresteingress) April 14th, 2011 @ 11:08 AM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
core module
People watching this ticket
Referenced by
- 19 multiple return statements cause missing postcondition validation (from [3a5962765b6baf077e0395beffeac5fabdba51fb]) multipl...
- 16 missing return causes wrong method behavior has been resolved due to work done in [#19]