Thread overview
[Issue 8971] New: __traits(getOverloads) fails in a member function
Nov 07, 2012
Max Samukha
Nov 07, 2012
Kenji Hara
Nov 07, 2012
Max Samukha
Nov 07, 2012
Max Samukha
Nov 08, 2012
Walter Bright
November 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971

           Summary: __traits(getOverloads) fails in a member function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: samukha@voliacable.com


--- Comment #0 from Max Samukha <samukha@voliacable.com> 2012-11-07 06:56:53 PST ---
class A
{
    void bar() {}

    void connect()
    {
        alias Tuple!(__traits(getOverloads, typeof(this), "bar")) overloads;
    }
}

Error: variable this cannot be read at compile time.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
           Severity|normal                      |regression


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-11-07 07:49:20 PST ---
This is a regression caused by fixing bug 8809.

https://github.com/D-Programming-Language/dmd/pull/1266

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971



--- Comment #2 from Max Samukha <samukha@voliacable.com> 2012-11-07 08:47:23 PST ---
(In reply to comment #1)
> This is a regression caused by fixing bug 8809.
> 
> https://github.com/D-Programming-Language/dmd/pull/1266

There are still problems http://d.puremagic.com/issues/show_bug.cgi?id=8972.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971



--- Comment #3 from Max Samukha <samukha@voliacable.com> 2012-11-07 09:49:31 PST ---
Another test case:


template Tuple(A...)
{
    alias A Tuple;
}

struct A
{
    void foo() {}

    void connect()
    {
        alias Tuple!(__traits(getOverloads, typeof(this), "foo")) overloads;
    }
}

Error: template instance test.Tuple!(this.foo) error instantiating

Should http://d.puremagic.com/issues/show_bug.cgi?id=8972 be marked as duplicate of this?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 07, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971



--- Comment #4 from github-bugzilla@puremagic.com 2012-11-07 15:23:15 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/bfacf77774b055913b1c721753705260d190648d fix Issue 8971 - __traits(getOverloads) fails in a member function

https://github.com/D-Programming-Language/dmd/commit/e7ec12925064436ac5fc2390515f92a137f0bf66 Merge pull request #1266 from 9rnsr/fix8971

Issue 8971 - __traits(getOverloads) fails in a member function

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8971


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