From 6aca3813c4ccc496c0f9b2db293acb546aa11d2d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 1 Nov 2023 21:42:12 -0700 Subject: Parameter binding and gfx fixes. (#3302) * Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He --- source/slang/slang-check-type.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-check-type.cpp') diff --git a/source/slang/slang-check-type.cpp b/source/slang/slang-check-type.cpp index 5967da8b0..b5ee2c4fc 100644 --- a/source/slang/slang-check-type.cpp +++ b/source/slang/slang-check-type.cpp @@ -317,6 +317,8 @@ namespace Slang if (!genericTypeParamDecl) return false; auto defaultType = CheckProperType(genericTypeParamDecl->initType); + if (!defaultType) + return false; auto witness = tryGetSubtypeWitness(defaultType, CheckProperType(constraintParam->sup)); if (!witness) { @@ -326,8 +328,6 @@ namespace Slang Diagnostics::typeArgumentDoesNotConformToInterface, defaultType, constraintParam->sup); - - SLANG_UNEXPECTED("default type argument does not conform to interface"); return false; } witnessArgs.add(witness); -- cgit v1.2.3