diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-04 21:57:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-04 21:57:50 -0800 |
| commit | bb017e6aa8ddbfac6b9a78a66f4706964fbeaff4 (patch) | |
| tree | e902a0c319a326a035f815e6ac16a3d19fc860d3 /source/slang/slang-ir.cpp | |
| parent | 2297623aad4c249bccae3fe363ada31e308131ac (diff) | |
Extend `as` and `is` operator to work on generic types. (#3672)
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index ff9c6f6f8..fd5ea0fc7 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -31,6 +31,11 @@ namespace Slang { if (!irObject) return; + if (as<IRType>(irObject)) + { + getTypeNameHint(sb, irObject); + return; + } if (auto nameHint = irObject->findDecoration<IRNameHintDecoration>()) { sb << nameHint->getName(); |
