]> git.leonardobizzoni.com Git - ObjectOriented-Prolog-Lisp/commitdiff
Rimosso controllo superfluo lunghezza argomenti metodi
authorLeonardoBizzoni <leo2002714@gmail.com>
Mon, 8 Jan 2024 12:55:14 +0000 (13:55 +0100)
committerLeonardoBizzoni <leo2002714@gmail.com>
Mon, 8 Jan 2024 12:55:14 +0000 (13:55 +0100)
Lisp/README.org
Lisp/ool.lisp

index ad688011bbfa7ad64be2704378929f5f18e39b0f..3dbd1bb92734e18642f6d2aa53bea96dea8562ba 100644 (file)
                  (error "~A non è un'istanza" this))
                (unless (get-method (getf this :methods) (first method))
                  (error "~A non ha un metodo ~A" (getf this :classname) (first method)))
-               (unless (eq (length args)
-                           (length (second (get-method (getf this :methods) (first method)))))
-                 (error "~A numero di argomenti errato" (first method)))
               (apply (get-body this (first method)) (append (list this) args)))))
    methods))
 
index cd40cf5457ef02119cf9193ff9c52fa40be003cc..dcfbd287fef92f1ee71939032a47e9de8aea7aeb 100644 (file)
                  (error "~A non è un'istanza" this))
                (unless (get-method (getf this :methods) (first method))
                  (error "~A non ha un metodo ~A" (getf this :classname) (first method)))
-               (unless (eq (length args)
-                           (length (second (get-method (getf this :methods) (first method)))))
-                 (error "~A numero di argomenti errato" (first method)))
               (apply (get-body this (first method)) (append (list this) args)))))
    methods))