diff src/luan/modules/BasicLuan.java @ 1561:e1a13e707bf3

start immutable
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 05 Nov 2020 20:24:09 -0700
parents 26c51acf00f3
children b89212fd04b5
line wrap: on
line diff
--- a/src/luan/modules/BasicLuan.java	Thu Oct 22 00:33:04 2020 -0600
+++ b/src/luan/modules/BasicLuan.java	Thu Nov 05 20:24:09 2020 -0700
@@ -15,6 +15,7 @@
 import luan.LuanFunction;
 import luan.LuanException;
 import luan.LuanCloner;
+import luan.LuanImmutabler;
 import luan.modules.parsers.LuanToString;
 
 
@@ -72,6 +73,10 @@
 			clone.list = (List)cloner.clone(list);
 			super.completeClone(dc,cloner);
 		}
+
+		@Override public void makeImmutable(LuanImmutabler immutabler) throws LuanException {
+			throw new LuanException("ipairs cannot be made immutable");
+		}
 	}
 
 	public static LuanFunction ipairs(LuanTable t) throws LuanException {
@@ -184,6 +189,10 @@
 			clone.args = (Object[])cloner.clone(args);
 			super.completeClone(dc,cloner);
 		}
+
+		@Override public void makeImmutable(LuanImmutabler immutabler) throws LuanException {
+			throw new LuanException("values cannot be made immutable");
+		}
 	}
 
 	public static LuanFunction values(final Object... args) throws LuanException {