Content assist doesn't work within an anonymous function

Bug Reports and Fixes
Post Reply
Huck Finn
Posts: 1
Joined: Sun Dec 07, 2008 11:51 am

Content assist doesn't work within an anonymous function

Post by Huck Finn » Sun Dec 07, 2008 12:23 pm

Content assist doesn't work within a body of an anonymous function when the function is passed as a non-first parameter to another function.

Consider the following example:

Code: Select all

/**
 * @class
 */
function Foo() {
    /**
     * @return {Object}
     */
    this.bar = function() {
        return {};
    };
}

function f1(/*Function*/f) {
    //
}

function f2(/*String*/s, /*Function*/f) {
    //
}

function f3(/*Function*/f, /*String*/s) {
    //
}

f1(function(/*Foo*/foo) {
       // code completion for foo works here
   });

f2('', function(/*Foo*/foo) {
       // !!! code completion for foo *DOESN'T* work here
   });

f3(function(/*Foo*/foo) {
       // code completion for foo works here
   }, '');
Neither foo nor foo's bar is shown in the pop-up list of choices when I type `f` or `foo.b` then Ctrl+Space in the position marked with `!!!`.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests