[Issue 3295] New: range's "front" property can not be an enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 3 13:29:17 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3295
Summary: range's "front" property can not be an enum
Product: D
Version: 2.031
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: 2korden at gmail.com
struct SomeInfiniteRange
{
enum front = 42; // not allowed
enum empty = false; // allowed
void popFront() {}
}
struct SomeContainer
{
auto opSlice()
{
return SomeInfiniteRange();
}
}
class Test
{
void test()
{
foreach (int f; _foo[]) {
// do nothing
}
}
private SomeContainer _foo;
}
test.d(21): Error: no property 'opApply' for type 'SomeInfiniteRange'
test.d(21): Error: function expected before (), not __error of type 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