Skip to content

Commit

Permalink
Fix after self-review.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Aug 30, 2023
1 parent 84e2782 commit dc18d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/smartcontracts/nativeSerializer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("test native serializer", () => {
assert.deepEqual(typedValues[6].valueOf(), null);
});

it("should perform type inference (variadic arguments)", async () => {
it("should perform type inference (regular variadic arguments)", async () => {
const endpointModifiers = new EndpointModifiers("", []);
const inputParameters = [new EndpointParameterDefinition("", "", new VariadicType(new U32Type(), false))];
const endpoint = new EndpointDefinition("foo", inputParameters, [], endpointModifiers);
Expand Down
2 changes: 1 addition & 1 deletion src/smartcontracts/nativeSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export namespace NativeSerializer {

function toVariadicValue(native: any, type: VariadicType, errorContext: ArgumentErrorContext): TypedValue {
if (type.isCounted) {
throw new ErrInvalidArgument(`Counted variadic arguments must be explicitly typed. E.g. use "VariadicValue.fromItemsCounted()"`);
throw new ErrInvalidArgument(`Counted variadic arguments must be explicitly typed. E.g. use "VariadicValue.fromItemsCounted()" or "new VariadicValue()"`);
}

if (native == null) {
Expand Down

0 comments on commit dc18d3a

Please sign in to comment.