close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 4426


Ignore:
Timestamp:
2016-06-08T21:11:16-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/integer-ring.lisp

    r4425 r4426  
    3333      (format stream "VALUE=~A" value))))
    3434
    35 (defmethod shared-initialize :before ((self integer-ring) slot-names
     35(defmethod shared-initialize :around ((self integer-ring) slot-names
    3636                                      &rest initargs
    37                                       &key value)
    38   (declare (ignore initargs))
    39   (assert (integerp value) nil "When initializing INTEGER-RING, argument VALUE must be an integer, got ~S." value))
     37                                      &key (value nil value-supplied-p))
     38  "Checks the argument VALUE. Calls error if it is not an integer."
     39  (declare (ignore  initargs))
     40  (when value-supplied-p
     41    (assert (integerp value) nil "When initializing INTEGER-RING, argument VALUE must be an integer, got ~S." value))
     42  (call-next-method))
    4043
    4144
     
    4851      (-1 self)
    4952      (t
     53       (warn "In UNARY-INVERSE with argument ~S, conversion from INTEGER-RING to RATIONAL-FIELD." self)
    5054       (unary-inverse (change-class self 'rational-field))))))
    5155
Note: See TracChangeset for help on using the changeset viewer.