Skip to content

Commit 54df7a5

Browse files
local() avoid scope spillover
1 parent 1694c99 commit 54df7a5

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

inst/tests/tests.Rraw

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21383,9 +21383,20 @@ if (!inherits(tryCatch(sqrt_elt_sym(1), error=identity), "error")) {
2138321383
}
2138421384
# edge case of weird, though technically valid, names:
2138521385
# _not_ '..N' style and distinct from '...'
21386-
`123` = `.123` = ..123 = ...123 = 'a'
2138721386
DT = data.table(a = 4L)
21388-
test(2329.09, DT[, ..123], DT)
21389-
test(2329.10, DT[, ...123], DT)
21390-
test(2329.11, DT[, ....123], DT)
21391-
test(2329.12, DT[, .....123], DT)
21387+
local({
21388+
`123` = 'a'
21389+
test(2329.09, DT[, ..123], DT)
21390+
})
21391+
local({
21392+
`.123` = 'a'
21393+
test(2329.10, DT[, ...123], DT)
21394+
})
21395+
local({
21396+
..123 = 'a'
21397+
test(2329.11, DT[, ....123], DT)
21398+
})
21399+
local({
21400+
...123 = 'a'
21401+
test(2329.12, DT[, .....123], DT)
21402+
})

0 commit comments

Comments
 (0)