October 06, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6695



--- Comment #10 from Kenji Hara <k.hara.pg@gmail.com> 2011-10-05 17:46:52 PDT ---
This issue is not limited only typeof(this).

struct S
{
  int x;
  void f() immutable {
    static assert(is(typeof(x) == immutable(int)));  // fails!
    static assert(is(typeof(x) == int));  // pass, but it is fake
  }
}

Because typeof(x) inside immutable member function f is translated to
typeof(this.x), and `this` is specially typed as S, then typeof returns int.

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


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #11 from Kenji Hara <k.hara.pg@gmail.com> 2011-10-06 00:04:33 PDT ---
https://github.com/D-Programming-Language/dmd/pull/434

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #12 from Walter Bright <bugzilla@digitalmars.com> 2011-10-06 02:25:32 PDT ---
https://github.com/D-Programming-Language/dmd/commit/48ad063f127d3b150f4f1ed5cb4b27ff18d9b6fe

https://github.com/D-Programming-Language/dmd/commit/451dbb73e356e3cf530cfc11e1b5094bc2b823af

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »