Bug 21295 – [REG] Symbol lookup/resolve in compilation broken in D
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-10-06T14:10:52Z
Last change time
2020-10-11T20:34:04Z
Assigned to
No Owner
Creator
Iain Buclaw
Comments
Comment #0 by ibuclaw — 2020-10-06T14:10:52Z
Apply this patch against dmd.
---
diff --git a/src/dmd/cond.d b/src/dmd/cond.d
index 22387072e..0fec9d421 100644
--- a/src/dmd/cond.d
+++ b/src/dmd/cond.d
@@ -32,7 +32,7 @@ import dmd.root.rootobject;
import dmd.root.string;
import dmd.tokens;
import dmd.utils;
-import dmd.visitor;
+//import dmd.visitor;
import dmd.id;
import dmd.statement;
import dmd.declaration;
---
And it compiles without any issue.
Compile dmd/cond.d individually though, and it's another matter.
$ dmd -version=MARS -I=src -J=. -J=src/dmd/res -c src/dmd/cond.d
src/dmd/cond.d(82): Error: undefined identifier Visitor
src/dmd/cond.d(499): Error: undefined identifier Visitor
src/dmd/cond.d(557): Error: function dmd.cond.DebugCondition.include does not override any function
src/dmd/cond.d(588): Error: function dmd.cond.DebugCondition.isDebugCondition does not override any function
src/dmd/cond.d(593): Error: undefined identifier Visitor
src/dmd/cond.d(598): Error: function dmd.cond.DebugCondition.toChars does not override any function
src/dmd/cond.d(831): Error: function dmd.cond.VersionCondition.include does not override any function
src/dmd/cond.d(866): Error: function dmd.cond.VersionCondition.isVersionCondition does not override any function
src/dmd/cond.d(871): Error: undefined identifier Visitor
src/dmd/cond.d(876): Error: function dmd.cond.VersionCondition.toChars does not override any function
src/dmd/cond.d(899): Error: function dmd.cond.StaticIfCondition.include does not override any function
src/dmd/cond.d(941): Error: undefined identifier Visitor
src/dmd/cond.d(946): Error: function dmd.cond.StaticIfCondition.toChars does not override any function
Here is *a* reduced test, there might be more hidden issues, but this should be trivial to debug.
// dmd/astcodegen;
module dmd.astcodegen;
struct ASTCodegen {
import dmd.dtemplate;
}
// dmd/ast_node.d
module dmd.ast_node;
import dmd.visitor : Visitor;
class ASTNode {
void accept(Visitor);
}
// dmd/cond.d
module dmd.cond;
import dmd.ast_node;
Visitor does_not_error; // <-- !!!!!!!!!
// dmd/dtemplate.d
module dmd.dtemplate;
import dmd.ast_node;
class TemplateParameter : ASTNode { }
// dmd/visitor.d
module dmd.visitor;
import dmd.astcodegen;
class Visitor { }
Comment #3 by dlang-bot — 2020-10-07T11:43:58Z
@ibuclaw created dlang/dmd pull request #11829 "Issue 21295: Add test for symbol lookup/resolve in compilation broken" mentioning this issue:
- Issue 21295: Add test for symbol lookup/resolve in compilation broken
https://github.com/dlang/dmd/pull/11829
Comment #4 by dlang-bot — 2020-10-07T12:28:47Z
dlang/dmd pull request #11829 "Issue 21295: Add test for symbol lookup/resolve in compilation broken" was merged into master:
- 0a33e7cb331719919ad49ba6c8c234ffbceef9b5 by Iain Buclaw:
Issue 21295: Add test for symbol lookup/resolve in compilation broken
https://github.com/dlang/dmd/pull/11829
Comment #5 by dlang-bot — 2020-10-07T12:33:50Z
@ibuclaw created dlang/dmd pull request #11831 "[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken" mentioning this issue:
- [dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken
https://github.com/dlang/dmd/pull/11831
Comment #6 by dlang-bot — 2020-10-11T20:29:53Z
dlang/dmd pull request #11831 "[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken" was merged into dmd-cxx:
- fa1aaa4e3aba806cecd68c70f3def12f50f472fb by Iain Buclaw:
[dmd-cxx] fix Issue 21295: Add test for symbol lookup/resolve in compilation broken
https://github.com/dlang/dmd/pull/11831