@@ -1618,9 +1618,51 @@ end
16181618        @test  x ==  [0.0 , 0.2 , 0.4 , 0.6 , 0.8 ]
16191619    end 
16201620
1621-     let  x =  @inferred  range (stop = 1 , step= 0. 2= 5 )
1621+     let  x =  @inferred  range (0.0 , step= 2 , length= 5 )
16221622        @test  x isa  StepRangeLen{Float64,Base. TwicePrecision{Float64},Base. TwicePrecision{Float64}}
1623-         @test  x ==  [0.2 , 0.4 , 0.6 , 0.8 , 1.0 ]
1623+         @test  x ==  [0.0 , 2.0 , 4.0 , 6.0 , 8.0 ]
1624+         @test  x ===  range (0.0 , step= 2.0 , length= 5 )
1625+         @test  x ===  range (0.0f0 , step= 2e0 , length= 5 )
1626+         @test  x ===  range (0e0 , step= 2.0f0 , length= 5 )
1627+     end 
1628+ 
1629+     #  start::IEEEFloat and step::Complex
1630+     let  x =  @inferred  range (2.0 , step= 1im , length= 3 )
1631+         @test  typeof (x) ===  StepRangeLen{ComplexF64, Float64, Complex{Int}, Int}
1632+         @test  x ==  range (2 , step= 1im , length= 3 )  #  compare with integer range
1633+         @test  x ==  2.0  .+  [0im , 1im , 2im ]
1634+     end 
1635+ 
1636+     #  start::Complex and step::IEEEFloat
1637+     let  x =  @inferred  range (2im , step= 1.0 , length= 3 )
1638+         @test  typeof (x) ===  StepRangeLen{ComplexF64, Complex{Int}, Float64, Int}
1639+         @test  x ==  range (2im , step= 1 , length= 3 )  #  compare with integer range
1640+     end 
1641+ 
1642+     #  stop::IEEEFloat and step::Complex
1643+     let  x =  @inferred  range (stop= 2.0 , step= 1im , length= 3 )
1644+         @test  typeof (x) ===  StepRangeLen{ComplexF64, ComplexF64, Complex{Int}, Int}
1645+         @test  x ==  range (stop= 2 , step= 1im , length= 3 )  #  compare with integer range
1646+         @test  x ==  2.0  .-  [2im , 1im , 0im ]
1647+     end 
1648+ 
1649+     #  stop::Complex and step::IEEEFloat
1650+     let  x =  @inferred  range (stop= 2im , step= 1.0 , length= 3 )
1651+         @test  typeof (x) ===  StepRangeLen{ComplexF64, ComplexF64, Float64, Int}
1652+         @test  x ==  range (stop= 2im , step= 1 , length= 3 )  #  compare with integer range
1653+     end 
1654+ 
1655+     let  x =  @inferred  range (stop= 10 , step= 2.0 , length= 5 )
1656+         @test  x isa  StepRangeLen{Float64,Base. TwicePrecision{Float64},Base. TwicePrecision{Float64}}
1657+         @test  x ===  @inferred  range (stop= 10.0 , step= 2.0 , length= 5 )
1658+         @test  x ===  @inferred  range (stop= 10f0 , step= 2.0 , length= 5 )
1659+         @test  x ===  @inferred  range (stop= 10e0 , step= 2.0f0 , length= 5 )
1660+         @test  x ==  [2 , 4 , 6 , 8 , 10 ]
1661+     end 
1662+ 
1663+     let  x =  @inferred  range (stop= 10.0 , step= 2 , length= 4 )
1664+         @test  x isa  StepRangeLen{Float64,Base. TwicePrecision{Float64},Base. TwicePrecision{Float64}}
1665+         @test  x ==  [4.0 , 6.0 , 8.0 , 10.0 ]
16241666    end 
16251667end 
16261668
0 commit comments