On 2012-05-18 17:11, Maxim Fomin wrote:
Changing template parameter to Bar.f or bar.f affects value of
bar.f.data. Seems to be a bug.
It's a bug. Further reduction:
import std.stdio;
mixin template Foo() {
string data = "default";
}
struct Bar {
mixin Foo f;
}
string get_data(alias u
Reduced:
import std.stdio;
mixin template Foo() {
string data = "default";
}
class Bar {
string data;
mixin Foo f;
}
void check_data(alias M, T)(T obj) {
writeln(M.stringof);
writeln(obj.data);
writeln(obj.f.data);
}
void main() {
Bar bar = new Bar;
bar.data = "Bar";
bar.f.d