http://d.puremagic.com/issues/show_bug.cgi?id=5424
Summary: Cant assign interfaces to Variants Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: mand...@brars.co.in --- Comment #0 from Mandeep Singh Brar <mand...@brars.co.in> 2011-01-07 19:45:07 PST --- > Hi, > > Is it possible to point a Variant to an interface. The below code does not > compile. > > module testD; > import std.stream; > import std.stdio; > import std.variant; > > interface A { > void func1(); > } > class AC: A { > void func1() { > writeln("func1"); > } > } > int main() { > A a = new AC(); > a.func1(); > Variant b = Variant(a); > return 0; > } > > It says that opEquals is not defined for the interface. > > Thanks & Regards > Mandeep -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------