[Issue 2778] alias this + IFTI doesn't work.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Nov  2 04:48:03 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=2778
Kenji Hara <k.hara.pg at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2011-11-02 04:47:30 PDT ---
I found a lack of my patch.
Code:
----
inout(T) [n] id(T, size_t n)(inout(T) [n] v){ return v; }
void main()
{
    static struct S
    {
        ubyte[3] val = [1,2,3];
        @property ref void[3] get(){ return *cast(void[3]*)&val; }
        alias get this;
    }
    S s;
    id(s);
}
Output:
----
test.d(18): Error: template test.id(T,uint n) does not match any function
template declaration
test.d(18): Error: template test.id(T,uint n) cannot deduce template function
from argument types !()(S)
Additional patch for repair it:
https://github.com/D-Programming-Language/dmd/pull/487
-- 
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