diff core/src/luan/impl/SetTableEntry.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
line wrap: on
line diff
--- a/core/src/luan/impl/SetTableEntry.java	Fri May 01 14:23:17 2015 -0600
+++ b/core/src/luan/impl/SetTableEntry.java	Fri May 01 15:13:14 2015 -0600
@@ -49,7 +49,9 @@
 			}
 			newindex(luan,h,key,value);
 		}
-		if( !JavaLuan.__newindex(luan,t,key,value) )
+		if( t != null && luan.currentEnvironment().hasJava() )
+			JavaLuan.__newindex(luan,t,key,value);
+		else
 			throw luan.bit(se).exception( "attempt to index '"+tableExpr.se().text()+"' (a " + Luan.type(t) + " value)" );
 	}