summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-conversion.cpp')
-rw-r--r--source/slang/slang-check-conversion.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-check-conversion.cpp b/source/slang/slang-check-conversion.cpp
index 44bb8a610..b4c5ebb4a 100644
--- a/source/slang/slang-check-conversion.cpp
+++ b/source/slang/slang-check-conversion.cpp
@@ -794,6 +794,12 @@ namespace Slang
}
}
+ // Disallow converting to a ParameterGroupType.
+ if (auto toParameterGroupType = as<ParameterGroupType>(toType))
+ {
+ return _failedCoercion(toType, outToExpr, fromExpr);
+ }
+
// We allow implicit conversion of a parameter group type like
// `ConstantBuffer<X>` or `ParameterBlock<X>` to its element
// type `X`.