diff options
| author | Yong He <yonghe@outlook.com> | 2023-11-01 21:42:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 21:42:12 -0700 |
| commit | 6aca3813c4ccc496c0f9b2db293acb546aa11d2d (patch) | |
| tree | 5281f0ac62946787db90409c1ab3da5ed3f0fc5c /source/slang/slang-check-type.cpp | |
| parent | 532c4322c9d9ab2c95a5bb573c89062456b59236 (diff) | |
Parameter binding and gfx fixes. (#3302)
* Parameter binding and gfx fixes.
* Add diagnostics on entry point parameters.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-type.cpp')
| -rw-r--r-- | source/slang/slang-check-type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
