Thread overview
[Issue 3318] New: Rebindable.get is not accessible
Sep 15, 2009
Sönke Ludwig
[Issue 3318] [PATCH]Rebindable.get is not accessible
Aug 31, 2010
Simen Kjaeraas
Oct 03, 2010
Jonathan M Davis
September 15, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3318

           Summary: Rebindable.get is not accessible
           Product: D
           Version: 2.032
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: ludwig@informatik.uni-luebeck.de


--- Comment #0 from Sönke Ludwig <ludwig@informatik.uni-luebeck.de> 2009-09-14 23:18:24 PDT ---
Rebindable.get is an alias for Rebindable.original, which in turn is private:

---
import std.typecons;

class C {}

void main(){
    Rebindable!(const(C)) test;
    const(C) testCopy = test.get;
}
---

test.d(7): Error: struct std.typecons.Rebindable!(const(C)).Rebindable member
original is not accessible
test.d(7): Error: struct std.typecons.Rebindable!(const(C)).Rebindable member
original is not accessible

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


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: -------
August 31, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3318


Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|]Rebindable.get is not      |[PATCH]Rebindable.get is
                   |accessible                  |not accessible


--- Comment #1 from Simen Kjaeraas <simen.kjaras@gmail.com> 2010-08-31 07:55:51 PDT ---
This is the fix - replace this line(746 in 2.048) in std/typecons.d:
            alias original get;
with this:
            @property
            ref T get( ) {
            return original;
            }

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


Andrei Alexandrescu <andrei@metalanguage.com> changed:

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


--- Comment #2 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-10-02 19:21:53 PDT ---
http://www.dsource.org/projects/phobos/changeset/2080

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


Jonathan M Davis <jmdavisProg@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg@gmx.com


--- Comment #3 from Jonathan M Davis <jmdavisProg@gmx.com> 2010-10-02 19:51:38 PDT ---
What's the point of

alias get this;

in the fix? I would have thought that that would conflict with the get property function. It would seem to make it so that get would either give you the type that Rebindable!() holds or Rebindable!() itself which would appear to effectively overload get on the return type.

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



--- Comment #4 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-10-03 12:09:35 PDT ---
The alias makes Rebindable!T a near-subtype of T.

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



--- Comment #5 from Steven Schveighoffer <schveiguy@yahoo.com> 2010-10-04 06:15:59 PDT ---
*** Issue 4978 has been marked as a duplicate of this issue. ***

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