[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch --- Comment #11

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-10-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC|

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #2 from luka8088 luka8...@owave.net 2011-09-20 08:19:42 PDT --- The actual problem is: import std.stdio; immutable struct a { b b1; } struct b { /* void c () { } case 1 = Error: function b.c () is not callable

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2011-09-20 08:47:22 PDT --- void c() const {} This should work, as mutable and const implicitly cast to immutable. Two other things (even though the above is the *right* solution

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #4 from Steven Schveighoffer schvei...@yahoo.com 2011-09-20 08:48:52 PDT --- (In reply to comment #3) void c() const {} This should work, as mutable and const implicitly cast to immutable. Oh my, that was completely off.

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #5 from luka8088 luka8...@owave.net 2011-09-20 09:13:20 PDT --- (In reply to comment #3) void c() const {} This should work, as mutable and const implicitly cast to immutable. yes, it works, thx ! Declaring an immutable

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #6 from Steven Schveighoffer schvei...@yahoo.com 2011-09-20 10:26:54 PDT --- (In reply to comment #5) so this is a bug or not ... ? // Error: function b.c () is not callable using argument types () immutable import

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #7 from luka8088 luka8...@owave.net 2011-09-20 10:59:37 PDT --- (In reply to comment #6) (In reply to comment #5) so this is a bug or not ... ? // Error: function b.c () is not callable using argument types () immutable

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #8 from Steven Schveighoffer schvei...@yahoo.com 2011-09-20 11:42:19 PDT --- (In reply to comment #7) I agree that maybe this is not a bug, but I don't agree with the explanation ... Documentation says Both immutable and

[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions

2011-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6695 --- Comment #9 from luka8088 luka8...@owave.net 2011-09-20 12:16:01 PDT --- (In reply to comment #8) (In reply to comment #7) I agree that maybe this is not a bug, but I don't agree with the explanation ... Documentation says Both