diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test index 747b14fce59ab65bc0324e28d1ca11432e604e52..f1dc824c72aaca9c94b7fa3e2124a04d6450d925 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test @@ -6001,6 +6001,15 @@ a + foo(c) * b #foo <- function(x) x*2; f <- function() a+foo(c)*b; as.function(c(alist(a=1+14, b=foo(x),c=), body(f)))(c=3,b=1) [1] 21 +##com.oracle.truffle.r.test.builtins.TestBuiltin_asfunction.testasfunction +#{ .Internal(as.function.default(alist(a+b), "foo")) } +Error in as.function.default(alist(a + b), "foo") : invalid environment + +##com.oracle.truffle.r.test.builtins.TestBuiltin_asfunction.testasfunction +#{ .Internal(as.function.default(function() 42, parent.frame())) } +Error in as.function.default(function() 42, parent.frame()) : + list argument expected + ##com.oracle.truffle.r.test.builtins.TestBuiltin_asfunction.testasfunction #{ as.function(alist("foo"))() } [1] "foo"