| Summary: | [validation] The local variable may not have been initialized | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Victor Homyakov <vkhomyackov> |
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> |
| Status: | NEW --- | QA Contact: | Chris Jaun <cmjaun> |
| Severity: | normal | ||
| Priority: | P3 | CC: | thomas |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
Still not fixed in WTP 3.4.0 (tested on Eclipse SDK Version: 3.8.0 Build id: M20120626-2030).
Shorter example:
function f1() {
var closing = setInterval(function() {
clearInterval(closing);
}, 30);
}
It works in Eclipse Java EE IDE for Web Developers. Version: Mars Milestone 5 (4.5.0M5) Build id: 20150205-1617 |
Overview: JS validator produces message "The local variable inner_callback may not have been initialized" on this code snippet: Element.addMethods({ observeOnce: function(element, event_name, outer_callback) { var inner_callback = function() { outer_callback.apply(this, arguments); Element.stopObserving(element, event_name, inner_callback); }; Element.observe(element, event_name, inner_callback); } }); Actual Results: Warning on line: Element.stopObserving(element, event_name, inner_callback); Expected Results: No warnings. Variable is initialized. Build Date & Platform: Eclipse Java EE IDE for Web Developers. Version: Indigo Release Build id: 20110615-0604