File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 19281928         (stmts (if blk? (cdr (butlast test)) '()))
19291929         (test  (if blk? (last test) test)))
19301930    (if (and (pair? test) (memq (car test) '(&& |\|\||)))
1931-         (let ((clauses `(,(car test) ,@(map expand-forms (cdr (flatten-ex (car test) test))))))
1931+         (let* ((clauses `(,(car test) ,@(map expand-forms (cdr (flatten-ex (car test) test)))))
1932+                (clauses (if (null? (cdr clauses))
1933+                             (if (eq? (car clauses) '&&) '(true) '(false))
1934+                             clauses)))
19321935          `(if ,(if blk?
19331936                    `(block ,@(map expand-forms stmts) ,clauses)
19341937                    clauses)
Original file line number Diff line number Diff line change 405405
406406    @test  @inferred (intersect (I, J)) ==  CartesianIndices ((2 : 3 , 4 : 5 ))
407407end 
408+ 
409+ #  issue #39705
410+ f39705 () =  Base. Cartesian. @nany  0  _ ->  true 
411+ @test  f39705 () ===  false 
Original file line number Diff line number Diff line change @@ -2707,3 +2707,7 @@ end == 4
27072707    @test  ncalls_in_lowered (:(.! (1  .<  A .<  2 )), GlobalRef (Base, :materialize )) ==  1 
27082708    @test  ncalls_in_lowered (:((.! )(1  .<  A .<  2 )), GlobalRef (Base, :materialize )) ==  1 
27092709end 
2710+ 
2711+ #  issue #39705
2712+ @eval  f39705 (x) =  $ (Expr (:|| )) &&  x
2713+ @test  f39705 (1 ) ===  false 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments