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



--- Comment #1 from Li Jie <cpun...@gmail.com> 2012-07-29 09:53:26 PDT ---
Shorter code:
---
import std.container;

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

    T opCast(T)() {
        return cast(T)value;
    }

    private int value;
}

void main() {
    SList!Foo list;
}
---

compile:
---
$ dmd testslist.d
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/container.d(938):
Error: function testslist.Foo.opCast!(Object).opCast () is not callable using
argument types ()
/home/lijie/.dvm/compilers/dmd-2.059/bin/../src/phobos/std/container.d(938):
Error: function testslist.Foo.opCast!(Object).opCast () is not callable using
argument types ()
testslist.d(16): 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