Changeset 13192 for trunk/abcl/src/org


Ignore:
Timestamp:
01/30/11 13:35:34 (11 years ago)
Author:
ehuelsmann
Message:

Signal an error containing the name of the class, when
the type of the CLASS-LAYOUT slot isn't what it is expected to be.

File:
1 edited

Legend:

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

    r12576 r13192  
    5050            return ((StandardClass)arg).allocateInstance();
    5151        if (arg.typep(StandardClass.STANDARD_CLASS) != NIL) {
    52             Layout layout = (Layout)Symbol.CLASS_LAYOUT.execute(arg);
    53             return new StandardObject(layout);
     52            LispObject l = Symbol.CLASS_LAYOUT.execute(arg);
     53            if (! (l instanceof Layout))
     54                return error(new ProgramError("Invalid standard class layout for: " + arg.writeToString()));
     55           
     56            return new StandardObject((Layout)l);
    5457        }
    5558        return type_error(arg, Symbol.STANDARD_CLASS);
Note: See TracChangeset for help on using the changeset viewer.