Thread overview
[Issue 3625] New: Rebindable does not work with forward declarations
Dec 17, 2009
Michel Fortin
Dec 20, 2009
Stewart Gordon
Aug 15, 2010
David Simcha
December 17, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3625

           Summary: Rebindable does not work with forward declarations
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: michel.fortin@michelf.com


--- Comment #0 from Michel Fortin <michel.fortin@michelf.com> 2009-12-17 13:30:13 EST ---
import std.typecons;

class A {
    Rebindable!(const B) r;
}

class B {
    Rebindable!(const A) r;
}

Changing the template condition of Rebindable to use is(T == class) instead of is(T : Object) fixes things.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3625


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |smjg@iname.com


--- Comment #1 from Stewart Gordon <smjg@iname.com> 2009-12-20 15:03:28 PST ---
You forgot to post the error messages.

----------
bz3625.d(4): Error: template instance Rebindable!(const(B)) does not match
templ
ate declaration Rebindable(T) if (is(T : Object) || isArray!(T))
bz3625.d(4): Error: Rebindable!(const(B)) is used as a type
bz3625.d(4): Error: variable bz3625.A.r voids have no value
----------
(DMD 2.036 Windows)

Moreover, are you sure this is a Phobos bug and not a compiler bug?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 15, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3625


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsimcha@yahoo.com
         Resolution|                            |FIXED


--- Comment #2 from David Simcha <dsimcha@yahoo.com> 2010-08-15 08:27:31 PDT ---
This one got fixed due to some forward referencing bugs getting fixed on the last release.

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