[dmd-cxx] fix Issue 19912: No implicit import of object module when an object declaration exists.#9999
Conversation
…eclaration exists.
|
Thanks for your pull request, @ibuclaw! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "dmd-cxx + dmd#9999" |
|
Are you all sure about this? It seems that, instead, any I'd prefer that Another option I'm considering is renaming Can't we just have Anyway, can we discuss how to move forward on this? I think there's more to consider here than just what this PR addresses. |
I think a better idea would be to have an auto imported package that would by default import object, that way we could split up the Frankenstein that is |
Oops, sorry. I see now that this PR is actually adding that behavior. That is consistent with the status quo, so 👍 I think this PR is OK as is, as it maintains the status quo, but there's still a systemic problem with the way D automatically imports the runtime and the fact that it requires certain symbols to be declared in a specific place. But, that's something that can be addressed later, I suppose. |
|
Yes, this just makes it so that you can't override the automatic import with another declaration of the same name. |
| /* | ||
| TEST_OUTPUT: | ||
| --- | ||
| fail_compilation/fail19912b.d(8): Error: class `fail19912b.object` conflicts with import `fail19912b.object` at fail_compilation/fail19912b.d |
There was a problem hiding this comment.
The error message mentions import, but there is no import in the source code. Can we come up with a better message?
d/dmd: Merge upstream dmd 78dc31152 Fixes bug where the object module was not always implicitly imported. Reviewed-on: dlang/dmd#9999 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272340 138bc75d-0d04-0410-961f-82ee72b054a4
PR d/90651 d/dmd: Merge upstream dmd 78dc31152 Fixes bug where the object module was not always implicitly imported. Reviewed-on: dlang/dmd#9999 From-SVN: r272340
No description provided.