diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-10 03:50:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 19:50:00 +0800 |
| commit | 8bf4743f5665ca3d9d04e4c93f7678c48e71aae0 (patch) | |
| tree | d7afaa1cdeaeccb0b5b02f7a15772125c912f278 /source | |
| parent | 89bf795f105ebe2703ee74a021e16786990ca7b2 (diff) | |
Create scope for synthesized property decl. (#5817)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index a666d9df3..7f07444dc 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -5070,7 +5070,9 @@ bool SemanticsVisitor::trySynthesizePropertyRequirementWitness( synPropertyDecl->nameAndLoc.name = getName(String("$syn_property_") + getText(requiredMemberDeclRef.getName())); synPropertyDecl->parentDecl = context->parentDecl; - + synPropertyDecl->ownedScope = m_astBuilder->create<Scope>(); + synPropertyDecl->ownedScope->containerDecl = synPropertyDecl; + synPropertyDecl->ownedScope->parent = context->parentDecl->ownedScope; // The type of our synthesized property can be derived from the // specialized declref to the requirement decl. |
