need help about get all public static function name

test test at gmail.com
Mon Oct 22 12:03:22 UTC 2018


On Monday, 22 October 2018 at 11:59:21 UTC, test wrote:
> On Monday, 22 October 2018 at 11:42:59 UTC, test wrote:
> I try made a simple example but it has no error:


I find the way to show the error:

https://run.dlang.io/is/f8cULz


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);


extern(C) void main(){
        auto id = Fiber.getThis(); // work here
}

struct TcpStream {
     void read(ubyte[] data){
            auto id = Fiber.getThis(); // not work here in my case
     }
}


More information about the Digitalmars-d-learn mailing list