Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

multiple return statements cause missing postcondition validation

#19
class BetterAccount extends Account {
    
    BigDecimal withdraw( BigDecimal amount )
    {
        if ((balance + frame) < amount) {
          return 0.0
        }
        
        balance -= amount
        return amount
    }
    
    BigDecimal getFrame() {
        return 100.0
    }
}

Reported by me (at andresteingress) · April 11th, 2011 @ 09:29 PM

State: resolved
Milestone: 1.2.2

Activity

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.