summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.cpp')
-rw-r--r--source/slang/syntax.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index ef5113f97..c49cd3648 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -505,9 +505,18 @@ void Type::accept(IValVisitor* visitor, void* extra)
if (aggTypeDeclRef.getDecl()->memberDictionary.TryGetValue(assocTypeDecl->getName(), targetType))
{
if (auto typeDefDecl = dynamic_cast<TypeDefDecl*>(targetType))
- return typeDefDecl->type.type->Substitute(aggTypeDeclRef.substitutions);
+ {
+ DeclRef<TypeDefDecl> targetTypeDeclRef(typeDefDecl, aggTypeDeclRef.substitutions);
+ return GetType(targetTypeDeclRef);
+ }
+ else if (auto targetAggType = dynamic_cast<AggTypeDecl*>(targetType))
+ {
+ return DeclRefType::Create(getSession(), DeclRef<Decl>(targetAggType, aggTypeDeclRef.substitutions));
+ }
else
- return DeclRefType::Create(getSession(), DeclRef<Decl>(targetType, aggTypeDeclRef.substitutions));
+ {
+ SLANG_UNIMPLEMENTED_X("unknown assoctype implementation type.");
+ }
}
}
}