[Differential] [Commented On] D4585: Simple unreachable-code detection
Francis Herne
noreply at phabricator.kde.org
Sun Feb 12 22:30:01 UTC 2017
flherne added a comment.
Hm, I think this actually needs to be merged into the declaration builder.
At the moment,
def foo():
if False: return 10
is given return type `int` when in fact it's equivalent to:
def foo():
if False: return 10
return None
And always returns `NoneType`.
i.e. the declaration builder must know whether the end of the function can be reached without hitting a return statement.
REPOSITORY
R53 KDevelop: Python Support
REVISION DETAIL
https://phabricator.kde.org/D4585
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170212/faa60ee6/attachment.html>
More information about the KDevelop-devel
mailing list