Bug 8971 – __traits(getOverloads) fails in a member function

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-07T06:56:00Z
Last change time
2012-11-30T21:22:12Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
samukha
Depends on
9100

Comments

Comment #0 by samukha — 2012-11-07T06:56:53Z
class A { void bar() {} void connect() { alias Tuple!(__traits(getOverloads, typeof(this), "bar")) overloads; } } Error: variable this cannot be read at compile time.
Comment #1 by k.hara.pg — 2012-11-07T07:49:20Z
This is a regression caused by fixing bug 8809. https://github.com/D-Programming-Language/dmd/pull/1266
Comment #2 by samukha — 2012-11-07T08:47:23Z
(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.
Comment #3 by samukha — 2012-11-07T09:49:31Z
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?
Comment #4 by github-bugzilla — 2012-11-07T15:23:15Z
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