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
Updated warning for referencing a non-existent value during creation of new column (#6016)
* Updated warning message in assign.c, as well as updated tests 316, 944.1 and 944.3
* added spaces for consistency
* Update src/assign.c warning
Co-authored-by: Michael Chirico <[email protected]>
* updated tests
---------
Co-authored-by: Michael Chirico <[email protected]>
test(944.1, DT[, foo:=NULL], DT, warning="Column 'foo' does not exist to remove")
2812
+
test(944.1, DT[, foo:=NULL], DT, warning="Tried to assign NULL to column 'foo', but this column does not exist to remove")
2813
2813
test(944.2, DT[,a:=1L], data.table(a=1L)) # can now add columns to an empty data.table from v1.12.2
2814
-
test(944.3, DT[,aa:=NULL], data.table(a=1L), warning="Column 'aa' does not exist to remove")
2814
+
test(944.3, DT[,aa:=NULL], data.table(a=1L), warning="Tried to assign NULL to column 'aa', but this column does not exist to remove")
2815
2815
test(944.4, DT[,a:=NULL], data.table(NULL))
2816
2816
if (base::getRversion() >= "3.4.0") {
2817
2817
test(944.5, typeof(structure(NULL, class=c("data.table","data.frame"))), 'list', warning="deprecated, as NULL cannot have attributes") # R warns which is good and we like
0 commit comments