diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sol-doc/src/solidity_doc_generator.ts | 4 | ||||
-rw-r--r-- | packages/sol-doc/test/solidity_doc_generator_test.ts | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts index 074fb1f37..b2b5daff3 100644 --- a/packages/sol-doc/src/solidity_doc_generator.ts +++ b/packages/sol-doc/src/solidity_doc_generator.ts @@ -291,11 +291,11 @@ function _genMethodReturnTypeDoc( methodReturnTypeDoc.typeDocType = TypeDocTypes.Tuple; methodReturnTypeDoc.tupleElements = []; for (const output of outputs) { - methodReturnTypeDoc.tupleElements.push({ name: output.name, typeDocType: TypeDocTypes.Intrinsic }); + methodReturnTypeDoc.tupleElements.push({ name: output.type, typeDocType: TypeDocTypes.Intrinsic }); } } else if (outputs.length === 1) { methodReturnTypeDoc.typeDocType = TypeDocTypes.Intrinsic; - methodReturnTypeDoc.name = outputs[0].name; + methodReturnTypeDoc.name = outputs[0].type; } return methodReturnTypeDoc; } diff --git a/packages/sol-doc/test/solidity_doc_generator_test.ts b/packages/sol-doc/test/solidity_doc_generator_test.ts index 0cbb786af..c780d3d31 100644 --- a/packages/sol-doc/test/solidity_doc_generator_test.ts +++ b/packages/sol-doc/test/solidity_doc_generator_test.ts @@ -86,8 +86,8 @@ describe('#SolidityDocGenerator', () => { it('parameter comment', () => { expect(methodDoc.parameters[0].comment).to.equal('publicMethod @param'); }); - it('return type name', () => { - expect(methodDoc.returnType.name).to.equal('r'); + it('return type', () => { + expect(methodDoc.returnType.name).to.equal('int256'); }); it('return comment', () => { expect(methodDoc.returnComment).to.equal('publicMethod @return'); @@ -116,8 +116,8 @@ describe('#SolidityDocGenerator', () => { it('parameter comment', () => { expect(methodDoc.parameters[0].comment).to.equal('externalMethod @param'); }); - it('return type name', () => { - expect(methodDoc.returnType.name).to.equal('r'); + it('return type', () => { + expect(methodDoc.returnType.name).to.equal('int256'); }); it('return comment', () => { expect(methodDoc.returnComment).to.equal('externalMethod @return'); |