diff --git a/src/coalesce.c b/src/coalesce.c index 70a0d0999a..0a0c3e393f 100644 --- a/src/coalesce.c +++ b/src/coalesce.c @@ -74,7 +74,7 @@ SEXP coalesce(SEXP x, SEXP inplaceArg) { } } break; case REALSXP: { - if (INHERITS(first, char_integer64) || INHERITS(first, char_nanotime)) { // integer64 and nanotime (it seem nanotime does not inherit from integer64) + if (Rinherits(first, char_integer64)) { // Rinherits() is true for nanotime int64_t *xP=(int64_t *)REAL(first), finalVal=NA_INTEGER64; int k=0; for (int j=0; j