D-Programming-Language/dmd — pull request #3884 by WalterBright (2014-08-22 07:20:21+00:00)
Title: [reg] fix Issue 11946 - need 'this' to access member when passing field to template parameter

This is a reversion of https://github.com/D-Programming-Language/dmd/pull/2794, hopefully without breaking subsequent fixes layered on top of it.

https://issues.dlang.org/show_bug.cgi?id=11946

#2794 was not a complete fix, and caused regressions, and so this issue awaits further engineering. I don't think we should be breaking existing code unless we've got a solid solution.

I used conditional compilation in order to make it easier to experiment with solutions. They should be removed once we do decide which direction we should go.

This should be merged into 2.066.