diff --git a/libs/ir/source/compiler.cpp b/libs/ir/source/compiler.cpp index c367b50..9f2e34b 100644 --- a/libs/ir/source/compiler.cpp +++ b/libs/ir/source/compiler.cpp @@ -613,7 +613,7 @@ namespace pslang::ir { auto before = last(); auto result = apply(*node.initializer); - if (result == before) + if (before == last()) { // Evaluating variable initializer didn't produce any nodes // It must have been just a reference to another variable or smth like that