This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250898 - Functions in IIFE are not always indexed
Summary: Functions in IIFE are not always indexed
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2015-03-04 15:13 UTC by Roman Svitanic
Modified: 2015-03-04 16:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Svitanic 2015-03-04 15:13:14 UTC
In following example

(function () {
    function Demo($scope) {
        $scope.text = 'Hello World!';

    function IndexedDemo() {
        this.sample = 5;

function Demo is NOT indexed, but IndexedDemo is indexed.
This leads to an issue in AngularJS support (bug #246444).
Comment 1 Roman Svitanic 2015-03-04 15:54:32 UTC
Also function which is the second argument in the following sample is NOT indexed:
(function () {
    app.controller('DemoCtrl', function () {
        // This function is NOT indexed
        this.sample = 5;

When the same function is named, then it IS indexed:
(function () {
    app.controller('DemoCtrl', function DemoCtrl() {
        // This function IS indexed
        this.sample = 5;