diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-09 04:48:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-09 20:48:03 +0800 |
| commit | 09a9d673322ebf4ca2fcb7d48f13a44e015ea33f (patch) | |
| tree | 8bae8fa5718669dcbff98b8bcb29784483905f34 /source/slang/slang-check-type.cpp | |
| parent | 051ae8acec0a641bcaf86e7eeff35eff29e8922d (diff) | |
Allow pointers to existential values. (#5793)
* Fix pointer offset logic and add executable tests.
* Fix.
* Fix test.
* Add existential ptr test.
* Allow pointers to existential values.
* Fix.
* Fix.
---------
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-type.cpp')
| -rw-r--r-- | source/slang/slang-check-type.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/slang-check-type.cpp b/source/slang/slang-check-type.cpp index d9691a828..2c8f3d0c0 100644 --- a/source/slang/slang-check-type.cpp +++ b/source/slang/slang-check-type.cpp @@ -216,9 +216,10 @@ bool isManagedType(Type* type) { if (auto declRefValueType = as<DeclRefType>(type)) { - if (as<ClassDecl>(declRefValueType->getDeclRef().getDecl())) + auto decl = declRefValueType->getDeclRef().getDecl(); + if (as<ClassDecl>(decl)) return true; - if (as<InterfaceDecl>(declRefValueType->getDeclRef().getDecl())) + if (as<InterfaceDecl>(decl) && decl->findModifier<ComInterfaceAttribute>()) return true; } return false; |
