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
# 7431 warn when .SD is returned after local assignment to .SD columns
21780
-
test(2378.1, {DT=data.table(a=1:3,b=1:3); DT[, {b[2] <- 0L; .SD}]}, data.table(a=1:3,b=1:3), warning="Local assignment to column\\(s\\) \\[b\\] detected in 'j' while also using \\.SD")
21781
-
test(2378.2, {DT=data.table(a=1:3,b=1:3,d=1:3); DT[a %in% 1:2, {b[d==2L] <- 0L; .SD}]}, data.table(a=1:2,b=1:2,d=1:2), warning="Local assignment to column\\(s\\) \\[b\\] detected in 'j' while also using \\.SD")
test(2378.1, {DT=data.table(a=1:3,b=1:3); DT[, {b[2] = 0L; .SD}]}, data.table(a=1:3,b=1:3), warning="Local assignment to column\\(s\\) \\[b\\] detected in 'j' while also using \\.SD")
21781
+
test(2378.2, {DT=data.table(a=1:3,b=1:3,d=1:3); DT[a %in% 1:2, {b[d==2L] = 0L; .SD}]}, data.table(a=1:2,b=1:2,d=1:2), warning="Local assignment to column\\(s\\) \\[b\\] detected in 'j' while also using \\.SD")
0 commit comments