Mercurial Hosting > luan
comparison core/src/luan/impl/IndexExpr.java @ 421:b31d614343e8
add Io.LuanString.text_writer();
improve java related errors;
fix to_string;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 01 May 2015 15:13:14 -0600 |
parents | 8fbb961aabd5 |
children | 23a93c118042 |
comparison
equal
deleted
inserted
replaced
420:e9d4d5854e54 | 421:b31d614343e8 |
---|---|
42 } | 42 } |
43 if( obj instanceof String ) | 43 if( obj instanceof String ) |
44 return StringLuan.__index(luan,(String)obj,key); | 44 return StringLuan.__index(luan,(String)obj,key); |
45 if( obj instanceof byte[] ) | 45 if( obj instanceof byte[] ) |
46 return BinaryLuan.__index(luan,(byte[])obj,key); | 46 return BinaryLuan.__index(luan,(byte[])obj,key); |
47 if( obj != null ) { | 47 if( obj != null && luan.currentEnvironment().hasJava() ) |
48 Object value = JavaLuan.__index(luan,obj,key); | 48 return JavaLuan.__index(luan,obj,key); |
49 if( value != null ) | 49 else |
50 return value; | 50 throw luan.bit(op1.se()).exception( "attempt to index '"+op1.se().text()+"' (a " + Luan.type(obj) + " value)" ); |
51 } | |
52 throw luan.bit(op1.se()).exception( "attempt to index '"+op1.se().text()+"' (a " + Luan.type(obj) + " value)" ); | |
53 } | 51 } |
54 } | 52 } |