[Issue 10803] pragma(msg, ...) fails with enum TypeTuple: compilation error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 12 12:13:53 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10803
--- Comment #8 from Kenji Hara <k.hara.pg at gmail.com> 2013-08-12 12:13:51 PDT ---
(In reply to comment #7)
> (In reply to comment #6)
> > It's documented in "Tuple Declarations" part.
>
> "Tuple Declarations" part speaks about something quite different - that you can
> use type tuple to group/ungroup parameter lists and reference that parameters
> using positional syntax, not via names.
>
> Now, after you comment, I see how actual tuple semantics/implementation makes
> both cases related. But documentation does not speak about what `TL` and `tl`
> actually are in that example or what happens from the type system point of
> view. It is just a single use case and it looks as special syntax sugar with no
> extra meaning. I am asking for a more detailed explanation in that part.
Ah, OK. I was wrong. D language has following feature:
- If given initializer is an Expression Tuple,
type inference would make the declaration Tuple Declaration.
alias EL = TypreTuple!(1, "str"); // Expression Tuple
alias TL = TypeTuple!(int, string); // Type Tuple
auto tup = EL;
is mostly same as:
TL tup;
tup[0] = TL[0];
tup[1] = TL[1];
Certainly this is not precisely documented in dlang.org/tuple.html
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list