compiler.embedding: handle calls into lambdas (poorly).

This commit is contained in:
whitequark 2015-08-28 05:13:38 -05:00
parent 5916c10b24
commit b35051cb08
1 changed files with 4 additions and 1 deletions

View File

@ -471,7 +471,10 @@ class Stitcher:
line += 1
source_line = linecache.getline(filename, line)
column = re.search("def", source_line).start(0)
if "<lambda>" in function.__qualname__:
column = 0 # can't get column of lambda
else:
column = re.search("def", source_line).start(0)
source_buffer = source.Buffer(source_line, filename, line)
return source.Range(source_buffer, column, column)