add and test support for fallback functions
This commit is contained in:
parent
3c7155afb0
commit
5b07669bd0
@ -1,6 +1,7 @@
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
AbiDefinition,
|
||||||
ConstructorAbi,
|
ConstructorAbi,
|
||||||
DataItem,
|
DataItem,
|
||||||
DevdocOutput,
|
DevdocOutput,
|
||||||
@ -100,10 +101,13 @@ function _genDocSection(compiledContract: StandardContractOutput): DocSection {
|
|||||||
// that's because the type of the events array doesn't have any fields for documentation!
|
// that's because the type of the events array doesn't have any fields for documentation!
|
||||||
break;
|
break;
|
||||||
case 'function':
|
case 'function':
|
||||||
|
case 'fallback':
|
||||||
docSection.methods.push(_genMethodDoc(abiDefinition, compiledContract.devdoc));
|
docSection.methods.push(_genMethodDoc(abiDefinition, compiledContract.devdoc));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`unknown and unsupported AbiDefinition type '${abiDefinition.type}'`);
|
throw new Error(
|
||||||
|
`unknown and unsupported AbiDefinition type '${(abiDefinition as AbiDefinition).type}'`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ contract NatspecEverything {
|
|||||||
/// @return publicMethod @return
|
/// @return publicMethod @return
|
||||||
function publicMethod(int p) public pure returns(int r) { return p; }
|
function publicMethod(int p) public pure returns(int r) { return p; }
|
||||||
|
|
||||||
|
/// @dev Fallback @dev
|
||||||
|
function () public {}
|
||||||
|
|
||||||
/// @notice externalMethod @notice
|
/// @notice externalMethod @notice
|
||||||
/// @dev externalMethod @dev
|
/// @dev externalMethod @dev
|
||||||
/// @param p externalMethod @param
|
/// @param p externalMethod @param
|
||||||
|
Loading…
x
Reference in New Issue
Block a user