|
|
@ -267,10 +267,7 @@ export default { |
|
|
|
// validate data type |
|
|
|
// validate data type |
|
|
|
if (parsedTree.callee.type === jsep.IDENTIFIER) { |
|
|
|
if (parsedTree.callee.type === jsep.IDENTIFIER) { |
|
|
|
const expectedType = formulas[parsedTree.callee.name].type |
|
|
|
const expectedType = formulas[parsedTree.callee.name].type |
|
|
|
if ( |
|
|
|
if (expectedType === formulaTypes.NUMERIC) { |
|
|
|
expectedType === formulaTypes.NUMERIC || |
|
|
|
|
|
|
|
expectedType === formulaTypes.STRING |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
parsedTree.arguments.map(arg => this.validateAgainstType(arg, expectedType, null, typeErrors)) |
|
|
|
parsedTree.arguments.map(arg => this.validateAgainstType(arg, expectedType, null, typeErrors)) |
|
|
|
} else if (expectedType === formulaTypes.DATE) { |
|
|
|
} else if (expectedType === formulaTypes.DATE) { |
|
|
|
if (parsedTree.callee.name === 'DATEADD') { |
|
|
|
if (parsedTree.callee.name === 'DATEADD') { |
|
|
|