Make sure that return at the end works properly for extract

This commit is contained in:
Dave Halter
2020-02-27 00:54:40 +01:00
parent a92c28840b
commit 35e992c37c
2 changed files with 38 additions and 0 deletions

View File

@@ -367,7 +367,31 @@ class X:
local1 = 3
local2 = 4
return local1 * glob1 * b
# bar
def f(self, b, c):
#? 11 text {'new_name': 'ab', 'until_line': 11, 'until_column': 10}
return self.ab(b)
# -------------------------------------------------- in-method-range-3
glob1 = 1
class X:
def f(self, b, c):
local1, local2 = 3, 4
#foo
#? 11 text {'new_name': 'ab', 'until_line': 7, 'until_column': 29}
return local1 & glob1 & b
# bar
local2
# ++++++++++++++++++++++++++++++++++++++++++++++++++
glob1 = 1
class X:
def ab(self, local1, b):
return local1 & glob1 & b
def f(self, b, c):
local1, local2 = 3, 4
#foo
#? 11 text {'new_name': 'ab', 'until_line': 7, 'until_column': 29}
return self.ab(local1, b)
# bar
local2