File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2254,15 +2254,6 @@ impl Compiler {
2254
2254
) -> CompileResult < u32 > {
2255
2255
let mut num_annotations = 0 ;
2256
2256
2257
- // Handle return annotation first
2258
- if let Some ( annotation) = returns {
2259
- self . emit_load_const ( ConstantData :: Str {
2260
- value : "return" . into ( ) ,
2261
- } ) ;
2262
- self . compile_annotation ( annotation) ?;
2263
- num_annotations += 1 ;
2264
- }
2265
-
2266
2257
// Handle parameter annotations
2267
2258
let parameters_iter = std:: iter:: empty ( )
2268
2259
. chain ( & parameters. posonlyargs )
@@ -2282,6 +2273,15 @@ impl Compiler {
2282
2273
}
2283
2274
}
2284
2275
2276
+ // Handle return annotation last
2277
+ if let Some ( annotation) = returns {
2278
+ self . emit_load_const ( ConstantData :: Str {
2279
+ value : "return" . into ( ) ,
2280
+ } ) ;
2281
+ self . compile_annotation ( annotation) ?;
2282
+ num_annotations += 1 ;
2283
+ }
2284
+
2285
2285
Ok ( num_annotations)
2286
2286
}
2287
2287
You can’t perform that action at this time.
0 commit comments