mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
Fix decorator on functions with defaults
This commit is contained in:
@@ -585,6 +585,9 @@ impl Compiler {
|
||||
let was_in_function_def = self.in_function_def;
|
||||
self.in_loop = false;
|
||||
self.in_function_def = true;
|
||||
|
||||
self.prepare_decorators(decorator_list)?;
|
||||
|
||||
let mut flags = self.enter_function(name, args)?;
|
||||
|
||||
let (new_body, doc_str) = get_doc(body);
|
||||
@@ -598,8 +601,6 @@ impl Compiler {
|
||||
self.emit(Instruction::ReturnValue);
|
||||
let code = self.pop_code_object();
|
||||
|
||||
self.prepare_decorators(decorator_list)?;
|
||||
|
||||
// Prepare type annotations:
|
||||
let mut num_annotations = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user