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
improve error message for nested assignment (#6484)
* improve error message for nested assignment
* new test case (will fail)
* working now
* improve error message for nested assignment
* need jj-1 (call itself is 1->offset)
* fix test to be applicable here
* Catch partially-named nested usage too
* consistent local naming
* move NEWS
* Use a helper to reduce repetition
if (!named_idx[n_lhs] && all(named_idx[-n_lhs])) {
1136
-
stopf("In %s(col1=val1, col2=val2, ...) form, all arguments must be named, but the last argument has no name. Did you forget a trailing comma?", root_name)
1140
+
stopf("In %s(col1=val1, col2=val2, ...) form, all arguments must be named, but the last argument has no name. Did you forget a trailing comma?", this_call)
1137
1141
} else {
1138
-
stopf("In %s(col1=val1, col2=val2, ...) form, all arguments must be named, but these arguments lack names: %s.", root_name, brackify(which(!named_idx)))
1142
+
stopf("In %s(col1=val1, col2=val2, ...) form, all arguments must be named, but these arguments lack names: %s.", this_call, brackify(which(!named_idx)))
for (jjincheck_entries) if (e[[jj]] %iscall% ":=")
3153
+
stopf("It looks like you re-used `:=` in argument %d a functional assignment call -- use `=` instead: %s(col1=val1, col2=val2, ...)", jj-1L, call_name)
0 commit comments