mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 10:54:42 +00:00
use more meaningful name than "workaround14447" (#18237)
This commit is contained in:
@@ -292,7 +292,7 @@ proc markAsClosure(g: ModuleGraph; owner: PSym; n: PNode) =
|
||||
if illegalCapture(s):
|
||||
localError(g.config, n.info,
|
||||
("'$1' is of type <$2> which cannot be captured as it would violate memory" &
|
||||
" safety, declared here: $3; using '-d:nimWorkaround14447' helps in some cases") %
|
||||
" safety, declared here: $3; using '-d:nimNoLentIterators' helps in some cases") %
|
||||
[s.name.s, typeToString(s.typ), g.config$s.info])
|
||||
elif not (owner.typ.callConv == ccClosure or owner.typ.callConv == ccNimCall and tfExplicitCallConv notin owner.typ.flags):
|
||||
localError(g.config, n.info, "illegal capture '$1' because '$2' has the calling convention: <$3>" %
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
when defined(nimHasLentIterators) and not defined(nimWorkaround14447):
|
||||
when defined(nimHasLentIterators) and not defined(nimNoLentIterators):
|
||||
template lent2(T): untyped = lent T
|
||||
else:
|
||||
template lent2(T): untyped = T
|
||||
|
||||
@@ -156,5 +156,5 @@ pkg "winim", allowFailure = true
|
||||
pkg "with"
|
||||
pkg "ws"
|
||||
pkg "yaml", "nim build"
|
||||
pkg "zero_functional", "nim c -r -d:nimWorkaround14447 test.nim"
|
||||
pkg "zero_functional", "nim c -r -d:nimNoLentIterators test.nim"
|
||||
pkg "zippy"
|
||||
|
||||
Reference in New Issue
Block a user