[Issue 8490] New: Global property calls do not work with auto expressions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 1 07:27:29 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8490

           Summary: Global property calls do not work with auto
                    expressions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-08-01 07:27:27 PDT ---
struct Foo { }
@property bool isTrue(Foo foo) { return true; }

void main()
{
    Foo[int] x = [1:Foo()];
    if (auto foo = 1 in x) {
        bool b = foo.isTrue;
    }
}

test.d(10): Error: no property 'isTrue' for type 'Foo'

-- 
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