Unverified Commit 217a979c authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1395 from ethereum/fix_ast_check

remove node.kind check since this is not necessarily present in ast t…
parents dc09581d 91920dbc
...@@ -35,7 +35,7 @@ function getAvailableFunctions (fileAST: AstNode, testContractName: string) { ...@@ -35,7 +35,7 @@ function getAvailableFunctions (fileAST: AstNode, testContractName: string) {
if(fileAST.nodes && fileAST.nodes.length > 0) { if(fileAST.nodes && fileAST.nodes.length > 0) {
const contractAST: AstNode[] = fileAST.nodes.filter(node => node.name === testContractName && node.nodeType === 'ContractDefinition') const contractAST: AstNode[] = fileAST.nodes.filter(node => node.name === testContractName && node.nodeType === 'ContractDefinition')
if(contractAST.length > 0 && contractAST[0].nodes) { if(contractAST.length > 0 && contractAST[0].nodes) {
const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => node.kind === 'function' && node.nodeType === "FunctionDefinition") const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => ((node.kind === "function" && node.nodeType === "FunctionDefinition") || (node.nodeType === "FunctionDefinition")))
funcList = funcNodes.map(node => node.name) funcList = funcNodes.map(node => node.name)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment