digitalmars.D.bugs - [Issue 3085] New: Cannot index tuple in declaration
- d-bugmail puremagic.com (42/42) Jun 19 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3085
- d-bugmail puremagic.com (10/10) Oct 11 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3085
- d-bugmail puremagic.com (10/10) Oct 11 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3085
- d-bugmail puremagic.com (9/9) Jan 23 2012 http://d.puremagic.com/issues/show_bug.cgi?id=3085
http://d.puremagic.com/issues/show_bug.cgi?id=3085
Summary: Cannot index tuple in declaration
Product: D
Version: 2.030
Platform: x86
OS/Version: All
Status: NEW
Keywords: patch, spec
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: rsinfu gmail.com
Created an attachment (id=400)
--> (http://d.puremagic.com/issues/attachment.cgi?id=400)
Patch (DMD 2.030)
The current declaration syntax does not handle a qualified type with an
intermediate segment which does tuple indexing.
For example, the following does not compile:
--------------------
import std.typetuple;
template Trait(alias v) { alias typeof(v) Type; }
alias TypeTuple!(Trait!(42)) List;
List[0].Type var; // -> "no identifier for declarator List[0]"
--------------------
The compiler cannot parse "List[0].Type" as a type.
The attached patch enables the compiler to handle such intermediate tuple
indexing with a slight change to the BasicType2 syntax:
--------------------
BasicType2:
*
[ ]
[ Expression ]
[ Expression .. Expression ]
[ Type ]
delegate Parameters FunctionAttributes_opt
function Parameters FunctionAttributes_opt
. IdentifierList // !! Add this
--------------------
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 19 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3085
Manuel König <manuelk89 gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |samukha voliacable.com
*** Issue 1503 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3085
Manuel König <manuelk89 gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |shro8822 vandals.uidaho.edu
*** Issue 2446 has been marked as a duplicate of this issue. ***
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 11 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3085
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla digitalmars.com
Severity|normal |enhancement
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2012









d-bugmail puremagic.com 