Thread overview
[Issue 7538] New: All kinds of property functions should be called before getting their types inside typeof
Feb 18, 2012
Kenji Hara
Jun 02, 2013
Kenji Hara
Jul 10, 2013
Walter Bright
February 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7538

           Summary: All kinds of property functions should be called
                    before getting their types inside typeof
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2012-02-18 07:48:12 PST ---
Test case;
----
@property int foo(){ return 1; }
@property int bar()(){ return 2; }
@property int baz(T)(){ return 2; }

struct S
{
    @property int foo(){ return 1; }
    @property int bar()(){ return 2; }
    @property int baz(T)(){ return 2; }
}

void main()
{
    static assert(is(typeof(foo) == int));          // OK
    static assert(is(typeof(bar) == int));          // failed
    static assert(is(typeof(baz!int) == int));      // OK

    S s;
    static assert(is(typeof(s.foo) == int));        // OK
    static assert(is(typeof(s.bar) == int));        // failed
    static assert(is(typeof(s.baz!int) == int));    // OK
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 02, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7538


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-06-02 09:09:33 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2123

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7538



--- Comment #2 from github-bugzilla@puremagic.com 2013-07-10 12:24:41 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1093dbe73f2414f4c03706e99888e0764b42fa65
fix Issue 7538 - All kinds of property functions should be called before
getting their types inside typeof

https://github.com/D-Programming-Language/dmd/commit/88b60e77fa9dea5487ebaa019c325910193f34aa Merge pull request #2123 from 9rnsr/fix7538

Issue 7538 - All kinds of property functions should be called before getting their types inside typeof

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7538


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------