Let Nil be converted to int, but other values cannot.

This commit is contained in:
James Roseborough
2007-08-01 06:16:28 +00:00
parent 01c5595fd6
commit 80677e9a16
2 changed files with 6 additions and 0 deletions

View File

@@ -15,4 +15,9 @@ public final class LNil extends LValue {
public LString luaGetType() {
return TYPE_NAME;
}
public int luaAsInt() {
return 0;
}
}

View File

@@ -105,6 +105,7 @@ public class LValue {
/** Return value as an integer */
public int luaAsInt() {
luaUnsupportedOperation();
return 0;
}