mirror of
https://github.com/apple/pkl.git
synced 2026-06-11 00:02:47 +02:00
Fix VmIntSeq.length (#1666)
This fixes an internal optimization. No language-observable change results from this fix, so no tests are introduced.
This commit is contained in:
@@ -50,6 +50,7 @@ public final class VmIntSeq extends VmValue implements Iterable<Long> {
|
||||
}
|
||||
|
||||
public long getLength() {
|
||||
if (isEmpty()) return 0;
|
||||
return (Math.abs((end - start) / step)) + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user