view graal/com.oracle.truffle.sl.test/tests/FunctionLiteral.sl @ 18191:839f97696479

Rename ResolvedJavaMethod.resolvedMethod() to resolveConcreteMethod() the reflect its actual behavior.
author Josef Eisl <josef.eisl@jku.at>
date Wed, 29 Oct 2014 18:54:32 +0100
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);
}