From 1343ab79fcd0ff9e5ffebbcf95414e51ab19e9cd Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 25 Jul 2024 11:49:07 -0700 Subject: Fix around extensions and `IDifferentiable` requirement synthesis. (#4729) * Check extensions before function parameters. Fix decl ref formation for synthesized differentiable requirements that are inside an extension. * Fix clang errors. * More clang fix. * Fix warnings. * Fix build error. * Fix. * Fix typo. --- source/slang/slang-ast-builder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-ast-builder.h') diff --git a/source/slang/slang-ast-builder.h b/source/slang/slang-ast-builder.h index 029c24216..5b4ec5538 100644 --- a/source/slang/slang-ast-builder.h +++ b/source/slang/slang-ast-builder.h @@ -336,7 +336,7 @@ public: case ASTNodeType::ThisTypeDecl: case ASTNodeType::ExtensionDecl: case ASTNodeType::AssocTypeDecl: - return getLookupDeclRef(lookupDeclRef->getLookupSource(), lookupDeclRef->getWitness(), memberDecl); + return getLookupDeclRef(lookupDeclRef->getLookupSource(), lookupDeclRef->getWitness(), memberDecl).template as(); default: break; } @@ -396,13 +396,13 @@ public: return getOrCreate(innerDecl, genericDeclRef, args); } - LookupDeclRef* getLookupDeclRef(Type* base, SubtypeWitness* subtypeWitness, Decl* declToLookup) + DeclRef getLookupDeclRef(Type* base, SubtypeWitness* subtypeWitness, Decl* declToLookup) { auto result = getOrCreate(declToLookup, base, subtypeWitness); return result; } - LookupDeclRef* getLookupDeclRef(SubtypeWitness* subtypeWitness, Decl* declToLookup) + DeclRef getLookupDeclRef(SubtypeWitness* subtypeWitness, Decl* declToLookup) { return getLookupDeclRef(subtypeWitness->getSub(), subtypeWitness, declToLookup); } -- cgit v1.2.3