From 5f0ee87dfde1ef65a6383ff54c3580cdc5eff3e2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 13 Mar 2024 12:17:01 -0700 Subject: Add wrapper type synthesis logic for constructors. (#3756) * Add wrapper type synthesis logic for constructors. * Fix. --- source/slang/slang-check-impl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/slang/slang-check-impl.h') 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, RefPtr> mapInterfaceToWitnessTable; }; + void addModifiersToSynthesizedDecl( + ConformanceCheckingContext* context, + DeclRef requirement, + FunctionDeclBase* synthesized, + ThisExpr* &synThis); + + void addRequiredParamsToSynthesizedDecl( + DeclRef requirement, + CallableDecl* synthesized, + List& synArgs); + FuncDecl* synthesizeMethodSignatureForRequirementWitness( ConformanceCheckingContext* context, DeclRef requiredMemberDeclRef, @@ -1614,6 +1625,12 @@ namespace Slang DeclRef requiredMemberDeclRef, RefPtr witnessTable); + bool trySynthesizeConstructorRequirementWitness( + ConformanceCheckingContext* context, + LookupResult const& lookupResult, + DeclRef requiredMemberDeclRef, + RefPtr witnessTable); + /// Attempt to synthesize a property that can satisfy `requiredMemberDeclRef` using `lookupResult`. /// /// On success, installs the syntethesized method in `witnessTable` and returns `true`. -- cgit v1.2.3