diff options
Diffstat (limited to 'source/slang/slang-ast-builder.cpp')
| -rw-r--r-- | source/slang/slang-ast-builder.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ast-builder.cpp b/source/slang/slang-ast-builder.cpp index f7304f308..be71fc334 100644 --- a/source/slang/slang-ast-builder.cpp +++ b/source/slang/slang-ast-builder.cpp @@ -936,6 +936,11 @@ top: { return bIsSubtypeOfCWitness; } + else if (auto declAIsSubtypeOfBWitness = as<DeclaredSubtypeWitness>(aIsSubtypeOfBWitness)) + { + if (declAIsSubtypeOfBWitness->isEquality()) + return bIsSubtypeOfCWitness; + } // Similarly, if `b == c`, then the `a <: b` witness is a witness for `a <: c` // @@ -943,6 +948,11 @@ top: { return aIsSubtypeOfBWitness; } + else if (auto declBIsSubtypeOfCWitness = as<DeclaredSubtypeWitness>(bIsSubtypeOfCWitness)) + { + if (declBIsSubtypeOfCWitness->isEquality()) + return declBIsSubtypeOfCWitness; + } // HACK: There is downstream code generation logic that assumes that // a `TransitiveSubtypeWitness` will never have a transitive witness |
