https://run.dlang.io/is/IygU5D
AllMembers states that struct S contains "this" member, but hasMember
negates it. Is it bug or misusing?
On Saturday, 17 November 2018 at 20:54:24 UTC, drug wrote:
https://run.dlang.io/is/IygU5D
AllMembers states that struct S contains "this" member, but
hasMember negates it. Is it bug or misusing?
I'm not sure what it is supposed to do, but since this is kinda
special - it is a keyword for the
On 18.11.2018 0:09, Adam D. Ruppe wrote:
On Saturday, 17 November 2018 at 20:54:24 UTC, drug wrote:
https://run.dlang.io/is/IygU5D
AllMembers states that struct S contains "this" member, but hasMember
negates it. Is it bug or misusing?
I'm not sure what it is supposed to do, but since this i
On Saturday, 17 November 2018 at 21:33:37 UTC, drug wrote:
Another problem I'm trying to resolve is that if I define
struct S outside of unittest or inside of unittest but using
static qualifier AllMembers does not return "this". Also if
struct S do not have methods AllMembers also doesn't retu
On 18.11.2018 1:26, Adam D. Ruppe wrote:
That's because the compiler passes it a hidden pointer to refer to the
context outside. The compiler could perhaps be smarter about it, and see
if those methods actually refer to the context, but it seems to simply
say if the method is there, it might
On Sunday, 18 November 2018 at 00:51:51 UTC, drug wrote:
On 18.11.2018 1:26, Adam D. Ruppe wrote:
That's because the compiler passes it a hidden pointer to
refer to the context outside. The compiler could perhaps be
smarter about it, and see if those methods actually refer to
the context, bu
On Sunday, 18 November 2018 at 02:37:13 UTC, Stanislav Blinov
wrote:
On Sunday, 18 November 2018 at 00:51:51 UTC, drug wrote:
On 18.11.2018 1:26, Adam D. Ruppe wrote:
That's because the compiler passes it a hidden pointer to
refer to the context outside. The compiler could perhaps be
smarter
On Sunday, 18 November 2018 at 09:10:57 UTC, bauss wrote:
On Sunday, 18 November 2018 at 02:37:13 UTC, Stanislav Blinov
wrote:
It's only "hidden" in that there's no symbol to access it...
But in that case shouldn't you be able to tell whether it has
it or not through hasMember?
Yah, a cas
On 18.11.2018 5:37, Stanislav Blinov wrote:
It's only "hidden" in that there's no symbol to access it. But you can
still access it via .tupleof, and it still of course affects the ABI
(i.e. S.sizeof is always at least pointer size when S is nested).
If you want to iterate fields, .tupleof is a
Reported:
https://issues.dlang.org/show_bug.cgi?id=19410
10 matches
Mail list logo