joyent/node — Issue #2312: Tab completion doesn't check for getters
Author: thejh
Created: 2011-12-11 07:31:50+00:00
State: open

Maybe this is a non-issue because you should just expect this to happen, but I'm not totally sure.

[jann@Jann-PC tmp]$ node
> var o = {get a: function(){ return console.log('FOOBAH!'), {b:1,c:2,d:3} }}
...
> var o = {get a(){ return console.log('FOOBAH!'), {b:1,c:2,d:3} }}
undefined
> o.a
FOOBAH!
{ b: 1, c: 2, d: 3 }
> o.a.[TAB]FOOBAH!

o.a.__defineGetter__ o.a.__defineSetter__ o.a.__lookupGetter__ o.a.__lookupSetter__ o.a.constructor o.a.hasOwnProperty
o.a.isPrototypeOf o.a.propertyIsEnumerable o.a.toLocaleString o.a.toString o.a.valueOf

o.a.b o.a.c o.a.d

> process.versions
{ node: '0.6.4',
v8: '3.6.4',
ares: '1.7.5-DEV',
uv: '0.6',
openssl: '1.0.0e-fips' }
>