summaryrefslogtreecommitdiff
path: root/source/slang/ast-legalize.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-12-26 21:04:53 -0500
committerGitHub <noreply@github.com>2017-12-26 21:04:53 -0500
commit69242398be1ba76898c0d6541eec3b7ca0ec1ab4 (patch)
treedd9649f2ae7bb04eae9c119f88c469f17638b1be /source/slang/ast-legalize.cpp
parentd1c38523d4bfbb6672baca9973013538b549bfae (diff)
parentfd0b8ca60e62bbc51b2be220f985dc3cc0d6dc82 (diff)
Merge pull request #330 from tfoleyNV/implicit-generic-app
Support generic type constraints when implicitly invoking generic
Diffstat (limited to 'source/slang/ast-legalize.cpp')
-rw-r--r--source/slang/ast-legalize.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/ast-legalize.cpp b/source/slang/ast-legalize.cpp
index 98a9c2573..4f17369f2 100644
--- a/source/slang/ast-legalize.cpp
+++ b/source/slang/ast-legalize.cpp
@@ -2623,6 +2623,9 @@ struct LoweringVisitor
if (auto litVal = dynamic_cast<ConstantIntVal*>(val))
return val;
+ // We do not use subtype witness for ast lowering, return it unchanged.
+ if (auto subtypeWitnessVal = dynamic_cast<SubtypeWitness*>(val))
+ return val;
SLANG_UNEXPECTED("unhandled value kind");
}