NerdLang/nerd

"arguments" array undefined

DirtyHairy opened this issue · 0 comments

var foo = console.log;

console.log = function() {
    foo.call(console, "hulpe");
    foo.apply(console, arguments);
}

console.log('hello world');

NodeJS:

node arguments.js
hulpe
hello world

Nectar:

$ nectar --run arguments.js
[*] Generating source file
[*] Compiling with preset: speed
/Users/pestix/dumpster/nectar/.nectar/218ia/arguments.cpp:325:25: error: use of undeclared identifier 'arguments'
  foo["apply"](console, arguments);
                        ^
1 error generated.
Error: Command failed: g++  -std=c++17 "/Users/pestix/dumpster/nectar/.nectar/cached_std_darwin_0.7.115/nectar.o" "/Users/pestix/dumpster/nectar/.nectar/218ia/arguments.cpp" -O3 -lpthread -s   -o "/Users/pestix/dumpster/nectar/arguments"
/Users/pestix/dumpster/nectar/.nectar/218ia/arguments.cpp:325:25: error: use of undeclared identifier 'arguments'
  foo["apply"](console, arguments);
                        ^
1 error generated