view graal/com.oracle.truffle.sl.test/tests/DefineFunction.sl @ 15818:718034423138

mxtool: fix archive subcommand such that it will return a successful returncode
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 21 May 2014 15:17:21 +0200
parents b16ec83edc73
children
line wrap: on
line source

function foo() {
  println(test(40, 2));
}

function main() {
  defineFunction("function test(a, b) { return a + b; }");
  foo();

  defineFunction("function test(a, b) { return a - b; }");
  foo();
}