Changeset 12114


Ignore:
Timestamp:
08/23/09 19:08:04 (12 years ago)
Author:
ehuelsmann
Message:

Verify simple types (single symbol types) while
interpreting the THE special operator.

Note: This helps argument verification while

interpreting structure slot accessors.

File:
1 edited

Legend:

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

    r11940 r12114  
    372372        if (args.length() != 2)
    373373          return error(new WrongNumberOfArgumentsException(this));
    374         return eval(args.cadr(), env, LispThread.currentThread());
     374        LispObject rv = eval(args.cadr(), env, LispThread.currentThread());
     375
     376        LispObject type = args.car();
     377        if (type instanceof Symbol
     378            || type instanceof BuiltInClass)
     379            if (rv.typep(type) == NIL)
     380                type_error(rv, type);
     381
     382        return rv;
    375383      }
    376384    };
Note: See TracChangeset for help on using the changeset viewer.