http://d.puremagic.com/issues/show_bug.cgi?id=8461

           Summary: std.container.SList can't work with std.typecons.Proxy
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: cpun...@gmail.com


--- Comment #0 from Li Jie <cpun...@gmail.com> 2012-07-29 09:13:43 PDT ---
code:
---
import std.typecons;
import std.container;

class Foo {
    this(int n) {
        value = n;
    }

    mixin Proxy!(value);

    private int value;
}

void main() {
    SList!Foo list;
    list.insertFront(new Foo(1));
}
---

compiler output:
---
$ dmd testslist.d 
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/container.d(938):
Error: template testslist.Foo.Proxy!(value).opCast does not match any function
template declaration
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/typecons.d(2796):
Error: template testslist.Foo.Proxy!(value).opCast(T,this X) cannot deduce
template function from argument types !(Object)()
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/container.d(938):
Error: template testslist.Foo.Proxy!(value).opCast does not match any function
template declaration
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/typecons.d(2796):
Error: template testslist.Foo.Proxy!(value).opCast(T,this X) cannot deduce
template function from argument types !(Object)()
testslist.d(15): Error: template instance std.container.SList!(Foo) error
instantiating
---

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

Reply via email to