Consider the code example at http://dlang.org/changelog.html#index-type-followed-ident : --- alias TypeTuple(T...) = T; struct S { alias T = int; alias U = TypeTuple!(long, string); } alias Types = Tuple!(S, S); Types[0].T a; // Types[0] == S, then typeof(a) == S.T == int Types[0].U[1] b; // Types[0].U == S.U, then typeof(b) == S.U[1] == string --- After fixing the typo: --- alias TypeTuple(T...)=T; struct S{ alias T=int; alias U=TypeTuple!(long,string); } alias Types=TypeTuple!(S,S); Types[0].T a; // Types[0] == S, then typeof(a) == S.T == int Types[0].U[1] b; // Types[0].U == S.U, then typeof(b) == S.U[1] == string --- We get (DMD 2.068.0): tt.d(10): Error: expected TypeTuple when indexing ('[0]'), got 'Types'. tt.d(11): Error: expected TypeTuple when indexing ('[0]'), got 'Types'. tt.d(11): Error: expected TypeTuple when indexing ('[0]'), got 'Types'. This should compile and do what is indicated.
OH MY GOD! The example code does not work even on master! When I wrote the example code, I did tested it something like. alias TypeTuple(T...) = T; struct S { alias T = int; alias U = TypeTuple!(long, string); } alias Types = TypeTuple!(S, S); struct X(Types...) // used tuple parameter { Types[0].T a; // Types[0] == S, then typeof(a) == S.T == int Types[0].U[1] b; // Types[0].U == S.U, then typeof(b) == S.U[1] == string } alias x = X!Types; After that, I rewrote the example code to current style WITHOUT testing! Finally, unworkable example code is shown in changelog...
(In reply to Kenji Hara from comment #1) > After that, I rewrote the example code to current style WITHOUT testing! > Finally, unworkable example code is shown in changelog... No worries, let's update the changelog then, and apparantly you're already working on a fix. https://github.com/D-Programming-Language/dlang.org/pull/1063 https://github.com/D-Programming-Language/dmd/pull/4876
Commits pushed to stable at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/73c72e309af19196e34de23ac57eaf476022515d Issue 14900 - fix changelog example https://github.com/D-Programming-Language/dlang.org/commit/24bc5ed3b3c66ff0b35e7ae0b5add5331a7cdd0f Merge pull request #1063 from MartinNowak/workaround14900 Issue 14900 - fix changelog example
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/73c72e309af19196e34de23ac57eaf476022515d Issue 14900 - fix changelog example https://github.com/D-Programming-Language/dlang.org/commit/24bc5ed3b3c66ff0b35e7ae0b5add5331a7cdd0f Merge pull request #1063 from MartinNowak/workaround14900
(In reply to Martin Nowak from comment #2) > No worries, let's update the changelog then, and apparantly you're already > working on a fix. > > https://github.com/D-Programming-Language/dlang.org/pull/1063 Thank you... I confirmed and merged the fix for the changelog example.
https://github.com/D-Programming-Language/dmd/pull/4876
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e68741604f64b3e0173fd9ffd2125d6c1e4e65ae fix Issue 14900 - 2.068.0 change log example does not compile Fix incomplete parser for statement scope declarations. https://github.com/D-Programming-Language/dmd/commit/4cf5cf76e2399f14d5673439da48cf511546a7b3 Merge pull request #4918 from 9rnsr/fix14889 Issue 14889 & 14900 & [REG2.068.0] 14911 - Reimplement fix for issue 1215
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e68741604f64b3e0173fd9ffd2125d6c1e4e65ae fix Issue 14900 - 2.068.0 change log example does not compile https://github.com/D-Programming-Language/dmd/commit/4cf5cf76e2399f14d5673439da48cf511546a7b3 Merge pull request #4918 from 9rnsr/fix14889