diff options
| author | Yong He <yonghe@outlook.com> | 2017-12-26 20:20:54 -0500 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-12-26 20:20:54 -0500 |
| commit | fd0b8ca60e62bbc51b2be220f985dc3cc0d6dc82 (patch) | |
| tree | dd9649f2ae7bb04eae9c119f88c469f17638b1be /source/slang | |
| parent | 4b53fd54e2b187a6d0f06ef8966608236d6e65d8 (diff) | |
fix ast-lowering of `TransitiveSubtypeWitness` values.
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/ast-legalize.cpp | 3 |
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"); } |
