diff options
| author | Yong He <yonghe@outlook.com> | 2024-07-25 11:49:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-25 11:49:07 -0700 |
| commit | 1343ab79fcd0ff9e5ffebbcf95414e51ab19e9cd (patch) | |
| tree | ccb40045b16e83aaac126b7a47cff46b0f02ecf4 /source/slang/slang-ast-builder.h | |
| parent | 3c03d279ee4ccf4796901f4ea6640787d341d11d (diff) | |
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.
Diffstat (limited to 'source/slang/slang-ast-builder.h')
| -rw-r--r-- | source/slang/slang-ast-builder.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<T>(); default: break; } @@ -396,13 +396,13 @@ public: return getOrCreate<GenericAppDeclRef>(innerDecl, genericDeclRef, args); } - LookupDeclRef* getLookupDeclRef(Type* base, SubtypeWitness* subtypeWitness, Decl* declToLookup) + DeclRef<Decl> getLookupDeclRef(Type* base, SubtypeWitness* subtypeWitness, Decl* declToLookup) { auto result = getOrCreate<LookupDeclRef>(declToLookup, base, subtypeWitness); return result; } - LookupDeclRef* getLookupDeclRef(SubtypeWitness* subtypeWitness, Decl* declToLookup) + DeclRef<Decl> getLookupDeclRef(SubtypeWitness* subtypeWitness, Decl* declToLookup) { return getLookupDeclRef(subtypeWitness->getSub(), subtypeWitness, declToLookup); } |
