History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-23796
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Dmitry Shaporenkov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Java Script: spurious warning about redundant local variable.

Created: 16 Oct 07 01:04   Updated: 11 Dec 07 17:48
Component/s: JavaScript
Fix Version/s: Diana 8243, Selena 7.0.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. screenshot-1.jpg
(238 kb)

Build: 7,304
Fixed in build: 7,596


 Description  « Hide
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...



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Shaporenkov - 16 Oct 07 01:10 - edited
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 - 16 Oct 07 01:11
Notice 'Use the checkbox below...' sentence