view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 21476:73713483b8ac

fixed npe in CompileTheWorld for methods that are already compiled
author Doug Simon <doug.simon@oracle.com>
date Sun, 24 May 2015 11:02:42 +0200
parents ff3136ecb5a7
children
line wrap: on
line source

function add(a, b) {
  return a + b;
}

function sub(a, b) {
  return a - b;
}

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

function main() {
  foo(add);
  foo(sub);
}