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-check-decl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-check-decl.cpp') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index aae741770..ffbc5a841 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -3234,7 +3234,7 @@ namespace Slang // First we need to make sure the associated `Differential` type requirement is satisfied. bool hasDifferentialAssocType = false; - for (auto existingEntry : witnessTable->requirementList) + for (auto existingEntry : witnessTable->requirementDictionary) { if (auto builtinReqAttr = existingEntry.Key->findModifier()) { @@ -4678,7 +4678,6 @@ namespace Slang void SemanticsDeclBodyVisitor::visitFunctionDeclBase(FunctionDeclBase* decl) { auto newContext = withParentFunc(decl); - _maybeRegisterDifferentialBottomTypeConformance(newContext); // Run checking on attributes that can't be fully checked in header checking stage. checkDerivativeOfAttribute(decl); @@ -6008,7 +6007,7 @@ namespace Slang // without any additional substitutions. if (extDecl->targetType->equals(type)) { - return extDeclRef; + return createDefaultSubstitutionsIfNeeded(m_astBuilder, this, extDeclRef).as(); } if (!TryUnifyTypes(constraints, extDecl->targetType.Ptr(), type)) -- cgit v1.2.3