Perl6 Object Oriented Cookbook (v0.2.1)  
Section 9: Assertions and Invariants  
 
Recipe 9.5: Extending Method Preconditions
Last Updated: Sep 8, 2003
Status: Draft
      Previous Page   Next Page

How important is this problem to you?
  (Login to Vote)
5.00 Rating, 1 Vote  

How acceptable is the proposed solution?
  (Login to Vote)
0.00 Rating, 0 Votes  

Problem:  

You have a method in a parent class with a declared precondition. You want to declare an additional precondition for that method in your subclass.

Solution:  

Discussion:

(Preconditions are OR, postconditions are AND) (Can you have a 'group' of preconditions, such that you can alter one precondition while leaving the others alone, sortof ANDing the group together?)


Log In to Comment


Login / Edit User Info -- Copyright © 2002 Cognitivity -- Previous Page   Next Page