www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - issues.dlang.org send mail to gmail failure.

reply test <test gmail.com> writes:
I like to report bugs,  first I hast to create a bug account.  
But I can not get the register email. (I already check my gmail 
Junk and use search)

The bugs is:

import std.traits;

struct FiberS {
	static auto getThis(){
		return Fiber.getId();
	}
}

struct Proxy(T){
  	T* ptr;
     alias getPayload this;

	 property ref auto getPayload() inout return {
		return *ptr ;
	}

     static auto getId(){
         return 1;
     }
}
alias Fiber = Proxy!(FiberS);
struct TcpStream {
    static void test(){
      auto id = Fiber.getThis(); // work here
    }
     void read(ubyte[] data){
            auto id = Fiber.getThis(); // not work here
     }
}


there other one is I can not append element to struct[] with 
betterC enabled. (I can append string and int[] in betterC, why 
not struct)?


And is one more is use stack with betterC:
scope tmp 	= new ubyte[4];
Oct 22 2018
next sibling parent test <test gmail.com> writes:
On Tuesday, 23 October 2018 at 05:32:43 UTC, test wrote:
 I like to report bugs,  first I hast to create a bug account.  
 there other one is I can not append element to struct[] with 
 betterC enabled. (I can append string and int[] in betterC, why 
 not struct)?
On betterC CTFE function(not as source code pass to DMD, but a include header from -I) . I also can not functionAttributes in betterC.
Oct 22 2018
prev sibling next sibling parent reply rikki cattermole <rikki cattermole.co.nz> writes:
Proxy!FiberS does not define a symbol called getThis that is static. And 
yes I did see the alias this, it does not propagate static symbols.

onlineapp.d(27): Error: this for getPayload needs to be type Proxy not 
type TcpStream
onlineapp.d(27): Error: no property getThis for type Proxy!(FiberS)
Oct 22 2018
parent test <test gmail.com> writes:
On Tuesday, 23 October 2018 at 05:57:30 UTC, rikki cattermole 
wrote:
 Proxy!FiberS does not define a symbol called getThis that is 
 static. And yes I did see the alias this, it does not propagate 
 static symbols.
then why this work ? static void test(){ auto id = Fiber.getThis(); // work here } alias this can be use to for private resource manage , explode proxy to public. allow forward static public Enum, Method and alias is very necessary to protect the resource struct really private.
Oct 22 2018
prev sibling parent reply Basile B. <b2.temp gmx.com> writes:
On Tuesday, 23 October 2018 at 05:32:43 UTC, test wrote:
 I like to report bugs,  first I hast to create a bug account.  
 But I can not get the register email. (I already check my gmail 
 Junk and use search)

 [...]
If you're blocked you can use `alias ptr this;` instead of `alias getPayload this;`, which will make the non static call working.
Oct 23 2018
parent reply test <test gmail.com> writes:
On Tuesday, 23 October 2018 at 08:26:04 UTC, Basile B. wrote:
 On Tuesday, 23 October 2018 at 05:32:43 UTC, test wrote:
 I like to report bugs,  first I hast to create a bug account.  
 But I can not get the register email. (I already check my 
 gmail Junk and use search)

 [...]
If you're blocked you can use `alias ptr this;` instead of `alias getPayload this;`, which will make the non static call working.
getPayload return a struct ref , and make sure there is no pointer escape and some extra check like atomic count check. so I can not simple use `alias ptr this;`. If some one here is able to login issues.dlang.org and has the free time, please help to submit a bug report.
Oct 23 2018
parent reply <Basile B. <b2.temp gmx.com> writes:
On Tuesday, 23 October 2018 at 10:17:56 UTC, test wrote:
 If some one here is able to login issues.dlang.org and has the 
 free time, please help to submit a bug report.
filed here: https://issues.dlang.org/show_bug.cgi?id=19327 you can give me your email if you want to subscribe but cant.
Oct 23 2018
parent test <test gmail.com> writes:
On Tuesday, 23 October 2018 at 11:58:48 UTC, Basile B. <b2.temp 
wrote:
 On Tuesday, 23 October 2018 at 10:17:56 UTC, test wrote:
 If some one here is able to login issues.dlang.org and has the 
 free time, please help to submit a bug report.
filed here: https://issues.dlang.org/show_bug.cgi?id=19327 you can give me your email if you want to subscribe but cant.
Thanks, I will try register late.
Oct 24 2018