fixes tcompiletimerange [bugfix] (#11720)
This commit is contained in:
parent
38b836b49e
commit
2895ad70c8
3 changed files with 29 additions and 7 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue