summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-expr.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-12 07:57:41 -0700
committerGitHub <noreply@github.com>2022-08-12 07:57:41 -0700
commit786f48d32340c36a06865a333ff9066033b5b2bc (patch)
treea3f5823e66b59517c6cd4a7d5ddd1774bf10ccb3 /source/slang/slang-ast-expr.h
parentb5d84f60d36b81c7e8263048dda031a9be14a106 (diff)
Fix logic of `is` operator. (#2359)
Diffstat (limited to 'source/slang/slang-ast-expr.h')
-rw-r--r--source/slang/slang-ast-expr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-ast-expr.h b/source/slang/slang-ast-expr.h
index 6f10f2d82..828ca035f 100644
--- a/source/slang/slang-ast-expr.h
+++ b/source/slang/slang-ast-expr.h
@@ -316,7 +316,8 @@ class IsTypeExpr : public Expr
// A witness showing that `typeExpr.type` is a subtype of `typeof(value)`.
Val* witnessArg = nullptr;
- bool isAlwaysTrue = false;
+ // non-null if evaluates to a constant.
+ BoolLiteralExpr* constantVal = nullptr;
};
/// A `value as Type` expression that casts `value` to `Type` within type hierarchy.