Changeset 11834
- Timestamp:
- 05/05/09 22:01:50 (14 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Java.java
r11762 r11834 626 626 instance = ((JavaObject)instanceArg).getObject(); 627 627 else { 628 type_error(instanceArg, 629 list(Symbol.OR, Symbol.STRING, Symbol.JAVA_OBJECT)); 630 // Not reached. 631 return null; 628 instance = instanceArg.javaInstance(); 632 629 } 633 630 try { -
trunk/abcl/src/org/armedbear/lisp/LispObject.java
r11754 r11834 103 103 { 104 104 return this; 105 /*return error(new LispError("The value " + writeToString() +106 " is not of primitive type."));*/107 105 } 108 106 109 107 public Object javaInstance(Class c) throws ConditionThrowable 110 108 { 111 if (c == LispObject.class)112 113 return error(new LispError("The value " + writeToString() +114 " is not of primitive type."));109 if (getClass().isAssignableFrom(c)) 110 return this; 111 return error(new LispError("The value " + writeToString() + 112 " is not of class " + c.getName())); 115 113 } 116 114
Note: See TracChangeset
for help on using the changeset viewer.