You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compile this with nim c --newruntime --d:newruntime
typeCustSeq=object
data: seq[int]
procnewCustSeq(len: Natural): CustSeq=result.data =newSeq[int](len)
whendefined(newruntime):
echo"Using Nim new runtime"proc`=sink`[T](a: varCustSeq, b: CustSeq) =echo"Value sinked"shallowCopy(a, b)
proc`=move`[T](a, b: varCustSeq) =echo"Value moved"shallowCopy(a, b)
procmain() =let a =newCustSeq(10)
let b = a
echo b
main()
Error: internal error: (filename: ccgexprs.nim, line: 972)
No stack traceback available
To create a stacktrace, rerun compilation with ./koch temp c <file>
Removing the [T] to the sink and move solves the issue
The text was updated successfully, but these errors were encountered:
Hint: used config file '/home/yardanico/Nim/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: test [Processing]
injecting into
## generic ``$`` operator for tuples that is lifted from the components
## of `x`. Example:
##
## .. code-block:: nim
## $(23, 45) == "(23, 45)"
## $() == "()"
result = "("
var firstElement = true
if not firstElement: add(result, ", ")
add(result, "data")
add(result, ": ")
if isNil(x.data): add(result, "nil")
else: add(result, $x.data)
firstElement = false
add(result, ")")
injecting into
let a = newCustSeq(10)
let b = a
echo [b]
test.nim(21, 7) Error: internal error: '=sink' operator is generic
Compile this with
nim c --newruntime --d:newruntime
Removing the [T] to the sink and move solves the issue
The text was updated successfully, but these errors were encountered: