mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-22 08:51:21 +00:00
fixes #23524 ```nim proc isAnalysableFieldAccess*(orig: PNode; owner: PSym): bool = ... result = n.kind == nkSym and n.sym.owner == owner and {sfGlobal, sfThread, sfCursor} * n.sym.flags == {} and (n.sym.kind != skParam or isSinkParam(n.sym)) ``` In `isAnalysableFieldAccess`, globals, cursors are already rejected
This commit is contained in:
@@ -158,9 +158,11 @@ when defined(nimHasEnsureMove):
|
||||
## Ensures that `x` is moved to the new location, otherwise it gives
|
||||
## an error at the compile time.
|
||||
runnableExamples:
|
||||
var x = "Hello"
|
||||
let y = ensureMove(x)
|
||||
doAssert y == "Hello"
|
||||
proc foo =
|
||||
var x = "Hello"
|
||||
let y = ensureMove(x)
|
||||
doAssert y == "Hello"
|
||||
foo()
|
||||
discard "implemented in injectdestructors"
|
||||
|
||||
type
|
||||
|
||||
Reference in New Issue
Block a user