diff options
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index f7ad5bdbf..d0b82c6bd 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2733,7 +2733,7 @@ namespace Slang // Get a reference to the builtin 'IDifferentiable' interface auto differentiableInterface = getASTBuilder()->getDifferentiableInterfaceType(); - auto conformanceWitness = as<Witness>(isSubtype(primalType, differentiableInterface)); + auto conformanceWitness = as<Witness>(isSubtype(primalType, differentiableInterface, IsSubTypeOptions::None)); // Check if the provided type inherits from IDifferentiable. // If not, return the original type. if (conformanceWitness) @@ -3116,6 +3116,12 @@ namespace Slang return expr; } + Expr* SemanticsExprVisitor::visitDefaultConstructExpr(DefaultConstructExpr* expr) + { + return expr; + } + + static bool _isSizeOfType(Type* type) { if (!type) @@ -3337,7 +3343,7 @@ namespace Slang valueType = typeType->getType(); // If value is a subtype of `type`, then this expr is always true. - if(isSubtype(valueType, expr->typeExpr.type)) + if(isSubtype(valueType, expr->typeExpr.type, IsSubTypeOptions::None)) { // Instead of returning a BoolLiteralExpr, we use a field to indicate this scenario, // so that the language server can still see the original syntax tree. |
