introduce StackValue.store(); use it to implement write access to fields and arrays

This commit is contained in:
Dmitry Jemerov
2011-04-15 18:59:57 +02:00
parent 9b0a9b71a2
commit b6f444b0f7
3 changed files with 81 additions and 57 deletions
@@ -313,6 +313,7 @@ public class NamespaceGenTest extends CodegenTestCase {
public void testArrayWrite() throws Exception {
loadText("fun foo(c: Array<String>) { c[0] = \"jet\"; }");
System.out.println(generateToText());
final Method main = generateFunction();
String[] array = new String[] { null };
main.invoke(null, new Object[] { array });