www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5424] New: Cant assign interfaces to Variants

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: mandeep brars.co.in



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: -------
Jan 07 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5424


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5424


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



20:29:37 PST ---
Fixed:
https://github.com/D-Programming-Language/phobos/commit/6f81c573f83a93feaacba1c937ed1c77a510ba95

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