From 88f04c29244af23c1cdd472d8d1ae3e5a650494e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 Aug 2022 14:11:27 -0700 Subject: `is` and `as` operator and `Optional`. (#2355) * `is` and `as` operator and `Optional`. * Fix. Co-authored-by: Yong He --- source/slang/slang-ast-type.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/slang-ast-type.cpp') diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 43fe751ee..664c940a8 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -517,6 +517,11 @@ Type* PtrTypeBase::getValueType() return as(findInnerMostGenericSubstitution(declRef.substitutions)->args[0]); } +Type* OptionalType::getValueType() +{ + return as(findInnerMostGenericSubstitution(declRef.substitutions)->args[0]); +} + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NamedExpressionType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! void NamedExpressionType::_toTextOverride(StringBuilder& out) -- cgit v1.2.3