Closed
Bug 384852
Opened 17 years ago
Closed 9 years ago
Strict warning "does not always return a value" should only be shown once per function
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jruderman, Unassigned)
References
()
Details
(Keywords: testcase)
js> (function(s,t) { if(s) return; if(t) return 1; return 2; })
strict warning: anonymous function does not always return a value:
strict warning: (function(s,t) { if(s) return; if(t) return 1; return 2; })
strict warning: .............................................^
strict warning: anonymous function does not always return a value:
strict warning: (function(s,t) { if(s) return; if(t) return 1; return 2; })
strict warning: .......................................................^
One of these warnings would be sufficient; there's no reason to warn every time another return statement is encountered.
It would be nice if it were more clear what the warning is complaining about. Pointing to the return that *doesn't* include a value would be an improvement.
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 1•9 years ago
|
||
Strict warning "does not always return a value" was removed in http://hg.mozilla.org/mozilla-central/rev/a470d0cbe3fa (bug 1046964)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•