[Issue 3451] New: Initializers don't work for tuple variables
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 29 08:39:03 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3451
Summary: Initializers don't work for tuple variables
Product: D
Version: 2.035
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: diagnostic, rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2009-10-29 08:39:03 PDT ---
Variables of tuple type can be used in assignments, but not anywhere else
(including initialization). And the error message is quite terrible.
void foo(T...)(T x) {
T a;
T b;
a = x; // ok
b = x; // ok
T c = x; // fails
}
void main() {
foo(1,2,3);
}
---
test.d(6): Error: cannot implicitly convert expression (tuple(_param_0,_param
1,_param_2)) of type (int, int, int) to int
--
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