Extract `include` func to dsymbolsem
public bool addisdone = false; /// true if members have been added to scope
public bool onStack = false;
This variables were private before I had to change it to public because I encountered errors like undefined identifier onStack and addisdone`
Still working on them though
Thanks for your pull request and interest in making D better, @dchidindu5! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:
- My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
- My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
- I have provided a detailed rationale explaining my changes
- New or modified functions have Ddoc comments (with
Params:andReturns:)
Please see CONTRIBUTING.md for more information.
If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.
Bugzilla references
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#16970"
can it be casted?
e.gLine 7539- cast(void) cache;
what about return null ?
e.g line 7535
Can it be removed entirely or to be casted?
@thewilsonator
What's the appropriate way to cast this
return condition.include(cdc._scope ? cdc._scope : sc) ? decl : cdc.elsedecl;
Looking good! You will need to update dmd/compiler/src/tests/cxxfrontend.cc:
home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc: In member function ‘virtual void MiniGlueVisitor::visit(TypeStruct*)’:
/home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc:795:35: error: ‘class AttribDeclaration’ has no member named ‘include’
795 | (void)attrib->include(NULL);
| ^~~~~~~
/home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc: In member function ‘virtual void MiniGlueVisitor::visit(TypeClass*)’:
/home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc:857:35: error: ‘class AttribDeclaration’ has no member named ‘include’
857 | (void)attrib->include(NULL);
| ^~~~~~~
/home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc: In member function ‘virtual void MiniGlueVisitor::visit(AttribDeclaration*)’:
/home/runner/work/dmd/dmd/dmd/compiler/src/tests/cxxfrontend.cc:1237:27: error: ‘class AttribDeclaration’ has no member named ‘include’
1237 | Dsymbols *ds = d->include(NULL);
Thank you all, over to the next