diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-13 12:17:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 12:17:01 -0700 |
| commit | 5f0ee87dfde1ef65a6383ff54c3580cdc5eff3e2 (patch) | |
| tree | 89155f3efc043671bd0278be24c2da9408d11bd6 /source/slang/slang-check-impl.h | |
| parent | 9fd74379c22af14f794d48fdc22e772d47f61ca3 (diff) | |
Add wrapper type synthesis logic for constructors. (#3756)
* Add wrapper type synthesis logic for constructors.
* Fix.
Diffstat (limited to 'source/slang/slang-check-impl.h')
| -rw-r--r-- | source/slang/slang-check-impl.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/slang/slang-check-impl.h b/source/slang/slang-check-impl.h index 702fe5619..b1618dfb6 100644 --- a/source/slang/slang-check-impl.h +++ b/source/slang/slang-check-impl.h @@ -1586,6 +1586,17 @@ namespace Slang Dictionary<DeclRef<InterfaceDecl>, RefPtr<WitnessTable>> mapInterfaceToWitnessTable; }; + void addModifiersToSynthesizedDecl( + ConformanceCheckingContext* context, + DeclRef<Decl> requirement, + FunctionDeclBase* synthesized, + ThisExpr* &synThis); + + void addRequiredParamsToSynthesizedDecl( + DeclRef<CallableDecl> requirement, + CallableDecl* synthesized, + List<Expr*>& synArgs); + FuncDecl* synthesizeMethodSignatureForRequirementWitness( ConformanceCheckingContext* context, DeclRef<FuncDecl> requiredMemberDeclRef, @@ -1614,6 +1625,12 @@ namespace Slang DeclRef<FuncDecl> requiredMemberDeclRef, RefPtr<WitnessTable> witnessTable); + bool trySynthesizeConstructorRequirementWitness( + ConformanceCheckingContext* context, + LookupResult const& lookupResult, + DeclRef<ConstructorDecl> requiredMemberDeclRef, + RefPtr<WitnessTable> witnessTable); + /// Attempt to synthesize a property that can satisfy `requiredMemberDeclRef` using `lookupResult`. /// /// On success, installs the syntethesized method in `witnessTable` and returns `true`. |
