File tree 2 files changed +13
-2
lines changed 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ def add(a, b):
15
15
assert c == 14
16
16
17
17
18
+ @logged
19
+ def add3 (a , b , c = 2 ):
20
+ return a + b + c
21
+
22
+
23
+ d = add3 (12 , 5 )
24
+
25
+ assert d == 20
26
+
27
+
18
28
def f (func ): return lambda : 42
19
29
class A : pass
20
30
a = A ()
Original file line number Diff line number Diff line change @@ -585,6 +585,9 @@ impl Compiler {
585
585
let was_in_function_def = self . in_function_def ;
586
586
self . in_loop = false ;
587
587
self . in_function_def = true ;
588
+
589
+ self . prepare_decorators ( decorator_list) ?;
590
+
588
591
let mut flags = self . enter_function ( name, args) ?;
589
592
590
593
let ( new_body, doc_str) = get_doc ( body) ;
@@ -598,8 +601,6 @@ impl Compiler {
598
601
self . emit ( Instruction :: ReturnValue ) ;
599
602
let code = self . pop_code_object ( ) ;
600
603
601
- self . prepare_decorators ( decorator_list) ?;
602
-
603
604
// Prepare type annotations:
604
605
let mut num_annotations = 0 ;
605
606
You can’t perform that action at this time.
0 commit comments