Bug 13466 – Refused Tuple.Types syntax in some cases

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-09-13T15:58:24Z
Last change time
2018-10-10T22:23:51Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-09-13T15:58:24Z
void main() { import std.typecons: Tuple, Nullable; import std.traits: TemplateArgsOf; alias NT = Nullable!(Tuple!int); alias T = TemplateArgsOf!NT[0]; pragma(msg, T); // Tuple!int alias I1 = T.Types[0]; pragma(msg, I1); // int alias I2 = TemplateArgsOf!NT[0].Types[0]; // error pragma(msg, I2); } DMD 2.067alpha gives: test.d(9,36): Error: semicolon expected to close alias declaration
Comment #1 by n8sh.secondary — 2018-10-10T22:23:51Z
Tested with DMD 2.082.0. Example code compiles without error.