summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index fbb30e4eb..4033dfff1 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -366,10 +366,11 @@ Index getFilterCountImpl(const ReflectClassInfo& clsInfo, MemberFilterStyle filt
{
if (auto conjunctionTypeWitness = as<ConjunctionSubtypeWitness>(extractFromConjunctionTypeWitness->conjunctionWitness))
{
- if (extractFromConjunctionTypeWitness->indexInConjunction == 0)
- return tryLookUpRequirementWitness(astBuilder, as<SubtypeWitness>(conjunctionTypeWitness->leftWitness), requirementKey);
- else
- return tryLookUpRequirementWitness(astBuilder, as<SubtypeWitness>(conjunctionTypeWitness->rightWitness), requirementKey);
+ auto componentWitness = as<SubtypeWitness>(
+ conjunctionTypeWitness->getComponentWitness(
+ extractFromConjunctionTypeWitness->indexInConjunction));
+
+ return tryLookUpRequirementWitness(astBuilder, componentWitness, requirementKey);
}
}
// TODO: should handle the transitive case here too