visitReturn fixes

Authored by flherne on Jan 16 2017, 2:24 PM.

Description

visitReturn fixes

Return statements were only checked to be inside a definition if they
had an explicit return value.

The test also included class definitions, so class Foo: return 7 got
no warning.

The implicit None return type was ignored if the same function
contained another return statement with an explicit value.

Fixes new tests:

  • misplaced_return_plain
  • misplaced_return_class
  • funccall_maybe_def_return

No test regressions.

Details

Committed
flherneJan 16 2017, 2:34 PM
Parents
R53:d5ec8bc8c9f6: Display parent classes with Python syntax in the tooltip.
Branches
Unknown
Tags
Unknown