Error: @nogc function run cannot call non- at nogc destructor TcpServer.~this

Newbie2019 newbie2019 at gmail.com
Wed Jul 17 10:51:53 UTC 2019


this is very hard to made a minimal example, and the projects 
only build with ldc.

There is a struct TcpServer has no destructor, and all method is 
@nogc nothrow.

but some how when I use it on function run @nogc nothrow, ldc 
report : @nogc function run cannot call non- at nogc destructor 
TcpServer.~this


this problem only exists for this TcpServer struct, all other 
struct without ~this() is ok.

And the code run fun before we add copyConstructor, but this one 
has no copyConstructor.



More information about the Digitalmars-d-learn mailing list