summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-ast-type.cpp3
-rw-r--r--source/slang/slang-ast-val.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index e3f75cb2f..bfa347df3 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -4,6 +4,7 @@
#include "slang-ast-builder.h"
#include "slang-ast-dispatch.h"
#include "slang-ast-modifier.h"
+#include "slang-check.h"
#include "slang-syntax.h"
#include <assert.h>
@@ -13,6 +14,7 @@ namespace Slang
bool isAbstractTypePack(Type* type)
{
+ type = unwrapModifiedType(type);
if (as<ExpandType>(type))
return true;
if (isDeclRefTypeOf<GenericTypePackParamDecl>(type))
@@ -22,6 +24,7 @@ bool isAbstractTypePack(Type* type)
bool isTypePack(Type* type)
{
+ type = unwrapModifiedType(type);
if (as<ConcreteTypePack>(type))
return true;
return isAbstractTypePack(type);
diff --git a/source/slang/slang-ast-val.h b/source/slang/slang-ast-val.h
index 7b9462f2f..d4edaae08 100644
--- a/source/slang/slang-ast-val.h
+++ b/source/slang/slang-ast-val.h
@@ -1014,6 +1014,10 @@ inline bool isTypeEqualityWitness(Val* witness)
}
return true;
}
+ else if (auto expandWitness = as<ExpandSubtypeWitness>(witness))
+ {
+ return isTypeEqualityWitness(expandWitness->getPatternTypeWitness());
+ }
return false;
}