mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	gh-123344: Add missing ast optimizations for PEP 696 (#123377)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
		
							parent
							
								
									9e108b8719
								
							
						
					
					
						commit
						be083cee34
					
				
					 3 changed files with 99 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -1087,10 +1087,13 @@ astfold_type_param(type_param_ty node_, PyArena *ctx_, _PyASTOptimizeState *stat
 | 
			
		|||
    switch (node_->kind) {
 | 
			
		||||
        case TypeVar_kind:
 | 
			
		||||
            CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVar.bound);
 | 
			
		||||
            CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVar.default_value);
 | 
			
		||||
            break;
 | 
			
		||||
        case ParamSpec_kind:
 | 
			
		||||
            CALL_OPT(astfold_expr, expr_ty, node_->v.ParamSpec.default_value);
 | 
			
		||||
            break;
 | 
			
		||||
        case TypeVarTuple_kind:
 | 
			
		||||
            CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVarTuple.default_value);
 | 
			
		||||
            break;
 | 
			
		||||
    }
 | 
			
		||||
    return 1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue