[Issue 11401] New: ElementType returns constructor instead of type
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 31 09:42:09 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11401
Summary: ElementType returns constructor instead of type
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: jcrapuchettes at gmail.com
--- Comment #0 from Jonathan Crapuchettes <jcrapuchettes at gmail.com> 2013-10-31 09:42:06 PDT ---
Using latest git HEAD, the following code produces an error where 2.063.2 does
not. It appears to be a problem with either std.range.ElementType or
std.traits.lvalueOf.
Code
---
import std.range;
void main()
{
alias ElementType!RowRange E;
static assert(is(typeof(E.id)), E.stringof~" is expected to have a 'id'
member");
}
struct RowRange
{
BasicNode front()
{
return BasicNode.init;
}
}
struct BasicNode { ushort id; }
Output
---
$ ~/dmd-git/build/bin/dmd serialize.d
test.d(6): Error: static assert "BasicNode() is expected to have a 'id'
member"
--
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