summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-type.cpp')
-rw-r--r--source/slang/slang-check-type.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-check-type.cpp b/source/slang/slang-check-type.cpp
index b8789dd76..aa2c69126 100644
--- a/source/slang/slang-check-type.cpp
+++ b/source/slang/slang-check-type.cpp
@@ -367,8 +367,15 @@ namespace Slang
{
return leftVar->declRef.equals(rightVar->declRef);
}
+ else if (auto rightPoly = as<PolynomialIntVal>(right))
+ {
+ return right->equalsVal(leftVar);
+ }
+ }
+ if (auto leftVar = as<PolynomialIntVal>(left))
+ {
+ return leftVar->equalsVal(right);
}
-
return false;
}