Changeset 3631


Ignore:
Timestamp:
09/08/03 18:28:06 (19 years ago)
Author:
piso
Message:

typep()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/DisplacedArray.java

    r3626 r3631  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: DisplacedArray.java,v 1.2 2003-09-08 17:18:07 piso Exp $
     5 * $Id: DisplacedArray.java,v 1.3 2003-09-08 18:28:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3131        this.array = array;
    3232        this.offset = offset;
     33    }
     34
     35    public LispObject typep(LispObject typeSpecifier) throws LispError
     36    {
     37        if (typeSpecifier == Symbol.ARRAY)
     38            return T;
     39        if (typeSpecifier instanceof LispClass) {
     40            final String name = typeSpecifier.getName();
     41            if (name.equals("ARRAY"))
     42                return T;
     43        }
     44        if (typeSpecifier instanceof Cons)
     45            return CompoundTypeSpecifier.getInstance(typeSpecifier).test(this);
     46        return super.typep(typeSpecifier);
    3347    }
    3448
Note: See TracChangeset for help on using the changeset viewer.