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.
Try this code /*global console, MyClass, MyFunc,*/ MyClass = { foo: null, init: function() { 'use strict'; var getsUsed = 'fubar'; // <- marked as unused this.foo = new MyFunc({ 'useful': getsUsed }); } };
there are also some other cases when variables are marked as unused though they are used: var Core = Core || {}; Core.needModules(function () { "use strict"; var REGEXP = /^[+]?\d{1,20}$/; // REGEXP marked as unused Core.Test = { test: function (value) { var fieldType; // fieldType marked as unused alert(REGEXP.test(value)); switch (fieldType) { case "test": alert(REGEXP.test(value)); break; } } }; });
The first case fixed as duplicate of #218090. The Fordfrog's case needs to be still fixed. I will separate it in the new issue. *** This bug has been marked as a duplicate of bug 218090 ***