Changeset 13750


Ignore:
Timestamp:
01/10/12 20:11:27 (12 years ago)
Author:
Mark Evenson
Message:

Fix #172: DOCUMENTATION now works for generic functions.

LispObject.java didn't know that things other than Function could be
in a symbol's function slot.

# From: Rudolf Schlatte <rudi@…>
# Subject: [armedbear-devel] Patch for bug 172
# Date: January 10, 2012 8:54:16 PM GMT+01:00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/LispObject.java

    r13521 r13750  
    659659      }
    660660    if(docType == Symbol.FUNCTION && this instanceof Symbol) {
    661         Object fn = ((Symbol)this).getSymbolFunction();
     661        LispObject fn = ((Symbol)this).getSymbolFunction();
    662662        if(fn instanceof Function) {
    663663            DocString ds = fn.getClass().getAnnotation(DocString.class);
     
    671671                    ((Symbol)this).setDocumentation(Symbol.FUNCTION, doc);
    672672                    return doc;
     673                } else if (fn instanceof StandardGenericFunction) {
     674                    return
     675                        StandardGenericFunction.checkStandardGenericFunction(fn)
     676                        .slots[StandardGenericFunctionClass.SLOT_INDEX_DOCUMENTATION];
    673677                }
    674678            }
Note: See TracChangeset for help on using the changeset viewer.