Fix dependency checker and add unit test

This commit is contained in:
Jérôme Leclercq
2022-02-28 13:28:59 +01:00
parent 1e606f3043
commit 142f15d538
3 changed files with 90 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ namespace Nz::ShaderAst
void DependencyCheckerVisitor::Visit(CallFunctionExpression& node)
{
const auto& targetFuncType = GetExpressionType(node);
const auto& targetFuncType = GetExpressionType(*node.targetFunction);
assert(std::holds_alternative<FunctionType>(targetFuncType));
const auto& funcType = std::get<FunctionType>(targetFuncType);