Skip to content

Commit bce0c05

Browse files
Apply suggestions from code review
Unify the translatable strings. Co-authored-by: Michael Chirico <[email protected]>
1 parent 3a4c6b9 commit bce0c05

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/between.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,16 @@ SEXP between(SEXP x, SEXP lower, SEXP upper, SEXP incbounds, SEXP NAboundsArg, S
3131

3232
// check before potential coercion which ignores methods, #7164
3333
if (INHERITS(x, char_integer64)) {
34-
if (!INHERITS(lower, char_integer64) || !INHERITS(upper, char_integer64))
35-
error(_("x is integer64 but lower and/or upper are not.")); // e.g. between(int64, character, character)
36-
} else if (INHERITS(lower, char_integer64) || INHERITS(upper, char_integer64))
37-
error(_("x is not integer64 but lower and/or upper is integer64. Please align classes."));
34+
if (!INHERITS(lower, char_integer64))
35+
error(_("x is integer64 but %s is not."), "lower"); // e.g. between(int64, character, character)
36+
if (!INHERITS(upper, char_integer64))
37+
error(_("x is integer64 but %s is not."), "upper"); // e.g. between(int64, character, character)
38+
} else {
39+
if (INHERITS(lower, char_integer64))
40+
error(_("x is not integer64 but %s is. Please align classes."), "lower");
41+
if (INHERITS(upper, char_integer64))
42+
error(_("x is not integer64 but %s is. Please align classes."), "upper");
43+
}
3844

3945
if (isInteger(x)) {
4046
if ((isInteger(lower) || fitsInInt32(lower)) &&

0 commit comments

Comments
 (0)