On 7/22/21 7:43 PM, apz28 wrote:

FbConnection is a class, FbXdrReader is a struct and for this call, response.data is not null & its' length will be greater than zero and FbConnection is not being used. So why DMD try to evaluate at compiled time hence error
1. Should not evaluate at compile time for this function call/construct
2. The error message is missing proper line # or nothing related to the module displayed in error message

https://github.com/apz28/dlang/blob/main/source/pham/db/db_fbbuffer.d#L527


I have a feeling that line is backwards.

It says: if the buffer has length, ignore it and use the connection, otherwise use the (empty) buffer data.

So perhaps this is actually a real error that is being flagged (because it's inlined)?

In any case, it's possible that fbConnection being null does not mean a null dereference, but I'd have to see the class itself. I'm surprised if you don't get a null dereference in non-release mode, unless this code is never actually called.

-Steve

Reply via email to