diff options
| author | Yong He <yonghe@outlook.com> | 2022-08-12 07:57:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-12 07:57:41 -0700 |
| commit | 786f48d32340c36a06865a333ff9066033b5b2bc (patch) | |
| tree | a3f5823e66b59517c6cd4a7d5ddd1774bf10ccb3 /source/slang/slang-ast-expr.h | |
| parent | b5d84f60d36b81c7e8263048dda031a9be14a106 (diff) | |
Fix logic of `is` operator. (#2359)
Diffstat (limited to 'source/slang/slang-ast-expr.h')
| -rw-r--r-- | source/slang/slang-ast-expr.h | 3 |
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. |
