[Issue 11614] New: Error: this for _expand_field_0 needs to be type Tuple not type Foo
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 26 23:46:40 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11614
Summary: Error: this for _expand_field_0 needs to be type Tuple
not type Foo
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: doob at me.com
--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-11-26 23:46:39 PST ---
The following code used to compile with DMD 2.063.2:
import std.typecons;
struct Foo
{
alias Tuple!(int) NEW_ARGS;
NEW_ARGS args;
void foo ()
{
static if (NEW_ARGS.length == 1) {}
}
}
But compiling the above code with DMD 2.064.2 results in this error:
typecons.d(389): Error: this for _expand_field_0 needs to be type Tuple not
type Foo
Am I doing something wrong or is this a regression? If I do any of the
following the code will compile:
* Move the static-if outside of "foo"
* Replace "NEW_ARGS.length" with "args.length" in the static-if
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list