Skip to content

Commit 4c3da4a

Browse files
Not much point to that
1 parent cc670d0 commit 4c3da4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Compiler/Optimize/LowerComputedCollections.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ let LowerComputedListOrArrayExpr tcVal (g: TcGlobals) amap overallExpr =
279279

280280
// [1..5] → [1; 2; 3; 4; 5] ≡ 1 :: 2 :: 3 :: 4 :: 5 :: []
281281
| SeqToList g (OptionalCoerce (OptionalSeq g amap (ConstInt32Range g (start, finish))), _) when
282-
finish - start + 1 < constListSizeThreshold
282+
finish - start < constListSizeThreshold
283283
->
284284
let rec conses acc n =
285285
if n < start then acc
@@ -309,7 +309,7 @@ let LowerComputedListOrArrayExpr tcVal (g: TcGlobals) amap overallExpr =
309309

310310
// [|1..5|] → [|1; 2; 3; 4; 5|]
311311
| SeqToArray g (OptionalCoerce (OptionalSeq g amap (ConstInt32Range g (start, finish))), m) when
312-
finish - start + 1 < constArraySizeThreshold
312+
finish - start < constArraySizeThreshold
313313
->
314314
Some (mkArray (g.int32_ty, [for n in start..finish -> Expr.Const(Const.Int32 n, Text.Range.range0, g.int32_ty)], m))
315315

0 commit comments

Comments
 (0)