[javascriptlint-commit] SF.net SVN: javascriptlint:[233] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2008-08-28 14:27:11
|
Revision: 233 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=233&view=rev Author: matthiasmiller Date: 2008-08-28 14:27:08 +0000 (Thu, 28 Aug 2008) Log Message: ----------- no_return_value: fix for if statements with else Modified Paths: -------------- trunk/pyjsl/warnings.py trunk/tests/warnings/no_return_value.js Modified: trunk/pyjsl/warnings.py =================================================================== --- trunk/pyjsl/warnings.py 2008-08-28 04:58:29 UTC (rev 232) +++ trunk/pyjsl/warnings.py 2008-08-28 14:27:08 UTC (rev 233) @@ -118,6 +118,8 @@ exit_points = _get_exit_points(if_) if else_: exit_points |= _get_exit_points(else_) + else: + exit_points.add(None) elif node.kind == tok.SWITCH: exit_points = set([None]) Modified: trunk/tests/warnings/no_return_value.js =================================================================== --- trunk/tests/warnings/no_return_value.js 2008-08-28 04:58:29 UTC (rev 232) +++ trunk/tests/warnings/no_return_value.js 2008-08-28 14:27:08 UTC (rev 233) @@ -16,6 +16,12 @@ } } + function error3(b) { /*warning:no_return_value*/ + if (b) { + return ""; + } + } + function correct(b) { if (b) return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |