Skip to content
Snippets Groups Projects
Commit 83acd4dd authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-2719] Fix cast in bitwiseShiftL.

parents 1e6b9d08 a6fd6a2b
No related branches found
No related tags found
No related merge requests found
......@@ -228,8 +228,7 @@ public class BitwiseFunctions {
Casts casts = new Casts(BitwiseShiftL.class);
casts.arg("a").defaultError(RError.Message.UNIMPLEMENTED_TYPE_IN_FUNCTION, typeName(), Operation.SHIFTL.name).mustBe(
doubleValue().or(integerValue())).asIntegerVector();
casts.arg("n").allowNull().mustBe(missingValue().not()).mapIf(stringValue(), chain(asStringVector()).with(shouldBe(anyValue().not(), RError.Message.NA_INTRODUCED_COERCION)).end(),
asIntegerVector());
casts.arg("n").allowNull().mustNotBeMissing().asIntegerVector();
}
@Specialization
......@@ -242,12 +241,6 @@ public class BitwiseFunctions {
protected Object bitwShiftL(RAbstractIntVector a, RNull n) {
return RDataFactory.createEmptyIntVector();
}
@Specialization
@SuppressWarnings("unused")
protected Object bitwShiftLChar(RAbstractVector a, RAbstractStringVector n) {
return makeNA(a.getLength());
}
}
@RBuiltin(name = "bitwiseNot", kind = INTERNAL, parameterNames = {"a"}, behavior = PURE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment