[Issue 3089] Error: f.bar can only be called on a mutable object, not shared(foo)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 7 14:43:51 PDT 2009


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


Rob Jacques <sandford at jhu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sandford at jhu.edu
         OS/Version|Linux                       |All




--- Comment #1 from Rob Jacques <sandford at jhu.edu>  2009-08-07 14:43:50 PDT ---
I've found const functions are callable on shared objects:

struct foo{
  int bar() const { return 1; }
}

void main(){
  shared foo f;
  auto x = f.bar;
}

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


More information about the Digitalmars-d-bugs mailing list