introduce temporary <//> for 'owned' to get this compile with 0.19 (#11145)
* introduce temporary <//> for 'owned' to get this compile with 0.19 * make newTable[string, owned Node]() compile (but it crashes) * make sink/owned parameters consistent * make actiontable test compile again * VM: support sytem.move; makes tests green
This commit is contained in:
parent
c94ab46923
commit
e1515b53d1
9 changed files with 69 additions and 46 deletions
|
|
@ -1641,6 +1641,9 @@ when defined(nimV2) and not defined(nimscript):
|
|||
proc unown*[T](x: T): T {.magic: "Unown", noSideEffect.}
|
||||
## Use the expression ``x`` ignoring its ownership attribute.
|
||||
|
||||
# This is only required to make 0.20 compile with the 0.19 line.
|
||||
template `<//>`*(t: untyped): untyped = owned(t)
|
||||
|
||||
else:
|
||||
template owned*(t: typeDesc): typedesc = t
|
||||
template unown*(x: typed): typed = x
|
||||
|
|
@ -1662,6 +1665,9 @@ else:
|
|||
new(r)
|
||||
return r
|
||||
|
||||
# This is only required to make 0.20 compile with the 0.19 line.
|
||||
template `<//>`*(t: untyped): untyped = t
|
||||
|
||||
template disarm*(x: typed) =
|
||||
## Useful for ``disarming`` dangling pointers explicitly for the
|
||||
## --newruntime. Regardless of whether --newruntime is used or not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue