diff options
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
| -rw-r--r-- | source/slang/slang-check-conformance.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp index 25a7ac4ee..6a397e8b6 100644 --- a/source/slang/slang-check-conformance.cpp +++ b/source/slang/slang-check-conformance.cpp @@ -180,8 +180,16 @@ namespace Slang } return true; } - - if( auto aggTypeDeclRef = declRef.as<AggTypeDecl>() ) + if (auto dynamicType = as<DynamicType>(subType)) + { + // A __Dynamic type always conforms to the interface via its witness table. + if (outWitness) + { + *outWitness = m_astBuilder->create<DynamicSubtypeWitness>(); + } + return true; + } + else if( auto aggTypeDeclRef = declRef.as<AggTypeDecl>() ) { ensureDecl(aggTypeDeclRef, DeclCheckState::CanEnumerateBases); @@ -363,7 +371,6 @@ namespace Slang } return true; } - // default is failure return false; } |
