On 11/16/14 5:41 AM, deadalnix wrote:
module a;
struct A(alias foo) {
auto foo() {
return foo();
}
}
I note here, the above doesn't is incorrect regardless, I assume you
didn't actually try to compile this post example :)
To fix, I did this:
struct A(alias foo) {
auto
16-Nov-2014 13:41, deadalnix пишет:
module a;
struct A(alias foo) {
auto foo() {
return foo();
}
}
module b;
import a;
void main() {
auto a = A!bar();
}
private int bar() { return 42; }
This do not work. I think it is a bug but I see how could see it as a
feature.
On Monday, 17 November 2014 at 14:13:21 UTC, Steven Schveighoffer
wrote:
I note here, the above doesn't is incorrect regardless, I
assume you didn't actually try to compile this post example :)
To fix, I did this:
struct A(alias foo) {
auto bar() {
return foo();
}
}
Sorry for
On Monday, 17 November 2014 at 20:45:28 UTC, Dmitry Olshansky
wrote:
I think that it's a bug or a very annoying feature.
I've seen it a few times before but never filed (I too wasn't
sure if it's by design).
Yes me too. I'm filling.
On Monday, 17 November 2014 at 22:17:01 UTC, deadalnix wrote:
On Monday, 17 November 2014 at 20:45:28 UTC, Dmitry Olshansky
wrote:
I think that it's a bug or a very annoying feature.
I've seen it a few times before but never filed (I too wasn't
sure if it's by design).
Yes me too. I'm
ping pong ping ping ?
On Sunday, 16 November 2014 at 10:41:20 UTC, deadalnix wrote:
module a;
struct A(alias foo) {
auto foo() {
return foo();
}
}
module b;
import a;
void main() {
auto a = A!bar();
}
private int bar() { return 42; }
This do not work. I think it is a bug but I see how could
On Sunday, 16 November 2014 at 10:41:20 UTC, deadalnix wrote:
module a;
struct A(alias foo) {
auto foo() {
return foo();
}
}
module b;
import a;
void main() {
auto a = A!bar();
}
private int bar() { return 42; }
This do not work. I think it is a bug but I see how could
On Monday, 17 November 2014 at 03:22:49 UTC, Meta wrote:
It seems like a feature to me. Otherwise, you would have A.foo,
which is in module a, calling a private function from module b.
I think it is sane that the function should be public if you
want to do things such as this. Furthermore, it
Actually, the more I think about it, the more I'm sure that it is
a bug. If you import A into module b, you should be able to use
it with the symbols in b. This actually seems like quite a bad
bug.
10 matches
Mail list logo