[Issue 6695] typeof(this) does not take into account const/immutable attributes inside member functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 20 09:13:46 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6695
--- Comment #5 from luka8088 <luka8088 at 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 struct is the same as applying immutable to all the
> members. Declaring a local immutable variable is the same thing.
>
so this is a bug or not ... ?
// Error: function b.c () is not callable using argument types () immutable
import std.stdio;
immutable struct a {
b b1;
}
struct b {
void c () { }
}
void main () {
a a1;
a1.b1.c();
}
--
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