fixes tcompiletimerange [bugfix] (#11720)

This commit is contained in:
Andreas Rumpf 2019-07-12 15:37:54 +02:00 • committed by GitHub
commit 2895ad70c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 7 deletions

View file

@ -1,18 +1,17 @@
discard """
disabled: "true"
"""
# issue #8199
const rangesGCHoldEnabled = not defined(rangesDisableGCHold)
const rangesGCHoldEnabled = true # not defined(rangesDisableGCHold)
type
# A view into immutable array
Range*[T] {.shallow.} = object
when rangesGCHoldEnabled:
gcHold: seq[T]
start: ptr T
mLen: int32
gcHold: seq[T] # 0
start: ptr T # 1
mLen: int32 # 2
type
BytesRange* = Range[byte]