← Back to index
|
Original Bugzilla link
Bug 9276 – regression(2.061): Forward reference error
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-06T20:34:00Z
Last change time
2013-01-31T12:07:35Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
timon.gehr
Attachments
ID
Filename
Summary
Content-Type
Size
1175
fwdref.zip
Repro test case.
application/zip
1731
Comments
Comment #0
by timon.gehr — 2013-01-06T20:34:55Z
Created attachment 1175 Repro test case. Compiles with 2.060, fails to compile with 2.061. run 'dmd parser' The test case is also added as an attachment. module declaration; import semantic, visitors, util; class Declaration{ mixin DownCastMethods!TemplateDecl; } class TemplateDecl: OverloadableDecl{ mixin Visitors; } module expression; import parser; import util; class Node{ mixin DownCastMethods!Declaration; } class Expression: Node{ } module hashtable;module parser; public import expression, declaration; module semantic; class Declaration{ mixin Visitors; } template Semantic(T) { private: struct { import hashtable; } } import visitors; class OverloadableDecl: Declaration{ } module type; import parser; class Type: Expression{ } // <- note to Walter. class BasicType: Type{ } module util; string _dgliteral(T...)(){foreach(t;T) return t.stringof; assert(0); } template DownCastMethods(T...){ enum x = _dgliteral!T; } module visitors; template Visitors(){ mixin Semantic!(typeof(this)); mixin DeepDup!(typeof(this)); } import type; template DeepDup(T) if(is(T: BasicType)){} template DeepDup(T) {}
Comment #1
by andrej.mitrovich — 2013-01-12T19:20:51Z
Introduced by commit 21c27b33e0111ed19c267517bf7efaba8def502e commit 21c27b33e0111ed19c267517bf7efaba8def502e Author: Walter Bright <
[email protected]
> Date: Tue Nov 13 02:29:20 2012 -0800 fix another fwd ref bug
Comment #2
by k.hara.pg — 2013-01-31T06:55:19Z
https://github.com/D-Programming-Language/dmd/pull/1588
Comment #3
by github-bugzilla — 2013-01-31T11:20:53Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/4d3c753525d543769a8240d576b96fbb15676da7
fix Issue 9276 - regression(2.061): Forward reference error
https://github.com/D-Programming-Language/dmd/commit/04902fcc96786f12ac2a2923d80da617d58aac2f
Merge pull request #1588 from 9rnsr/fix9276 Issue 9276 - regression(2.061): Forward reference error
Comment #4
by timon.gehr — 2013-01-31T12:07:35Z
Great, now I can upgrade. Thanks a lot!