From 786f48d32340c36a06865a333ff9066033b5b2bc Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 12 Aug 2022 07:57:41 -0700 Subject: Fix logic of `is` operator. (#2359) --- source/slang/slang-parser.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 7447859c7..33f2e251b 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -4858,6 +4858,7 @@ namespace Slang isExpr->value = expr; parser->ReadToken(); isExpr->typeExpr = parser->ParseTypeExp(); + isExpr->loc = opToken.loc; expr = isExpr; continue; } @@ -4867,6 +4868,7 @@ namespace Slang asExpr->value = expr; parser->ReadToken(); asExpr->typeExpr = parser->ParseType(); + asExpr->loc = opToken.loc; expr = asExpr; continue; } -- cgit v1.2.3