From 801aa3b44254341018a1acbe754f2ce3b0900e2a Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 16 Nov 2022 12:17:49 -0800 Subject: Clean up type checking of higher order expressions. (#2519) * Clean up type checking of higher order expressions. * Replace `goto` with `break` to pacify clang. * Fix. * Fixes. * Fix more tests. * Fix lowerWitnessTable parameter error. * Exclude attributes from ast printing. Co-authored-by: Yong He --- source/slang/slang-ast-type.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (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 ba033c3ad..76623d01c 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -495,10 +495,9 @@ Type* OptionalType::getValueType() void NamedExpressionType::_toTextOverride(StringBuilder& out) { - Name* name = declRef.getName(); - if (name) + if (declRef.getDecl()) { - out << name->text; + _printNestedDecl(declRef.substitutions, declRef.getDecl(), out); } } -- cgit v1.2.3