Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Maxim Mossienko 
Subsystem
JavaScript 
Affected versions
Fixed in
Fixed in build
Next build 
Build
7304
Fixed in build
7596
  • Submitted by   Dmitry Shaporenkov
    2 years ago (16 Oct 2007 01:04)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:54)
  • Jira: IDEA-41627
    (history, comments)

IDEA-41627

Java Script: spurious warning about redundant local variable.

0
Added by <no user>
15 Sep 2009
screenshot-1.jpg   (237 KB)

I'm seeing this for 'testsFailedBefore' in the following code:

function runTestFixture (testDoc, testFixture, continuation) {
  var testCases = getTestFunctions(testFixture);
  var testsFailedBefore = gTestsFailed; // why is it redundant?

  runTests(testDoc, testFixture, testCases, 0, function () {
    if (testsFailedBefore == gTestsFailed) {
      setStatus(testDoc, testFixture, null, ICON_SUCCESS);
    }    
    if (isFunction(continuation)) continuation();
  });
}


Unless I'm completely missing something, 'testsFailedBefore' declaration is not redundant here...

Issue was resolved
Comments (2)
 
History (1)
 
Links
 
Dmitry Shaporenkov
  Dmitry Shaporenkov
16 Oct 2007 01:10
(2 years ago)
#permalink
BTW, it seems that the inspection description that is shown when clicking on the 'more' link in the tooltip is literally copied from somewhere, and part of the context is lost. Check the attached screenshot - this text mentions some 'textbox below'. I'm having hard time to find this checkbox...
Dmitry Shaporenkov
  Dmitry Shaporenkov
16 Oct 2007 01:11
(2 years ago)
#permalink
Notice 'Use the checkbox below...' sentence