Re: Nondeterministic unittest debugging problem.

2021-08-16 Thread russhy via Digitalmars-d-learn
remove the .dub folder and try again, as stated in other reply, might be a cache issue, or something that picks an outdated file in the cache

Re: DMD compiler - warning of unused variables

2021-08-16 Thread russhy via Digitalmars-d-learn
On Monday, 16 August 2021 at 14:14:27 UTC, DLearner wrote: Hi Please see code below: ``` void main() { import std.stdio; size_t i; size_t j; i = 5; writeln("i = ",i); } ``` Is there a compiler option that would warn that variable 'j' is defined but not used? Best regards

Re: Anyway to achieve the following

2021-08-16 Thread JG via Digitalmars-d-learn
On Sunday, 15 August 2021 at 21:53:14 UTC, Carl Sturtivant wrote: On Sunday, 15 August 2021 at 07:10:17 UTC, JG wrote: [...] What you are asking for are reference variables. C++ has them: the example here illustrates the behavior you want. https://www.geeksforgeeks.org/references-in-c/ [...

Re: DMD compiler - warning of unused variables

2021-08-16 Thread user1234 via Digitalmars-d-learn
On Monday, 16 August 2021 at 14:14:27 UTC, DLearner wrote: Is there a compiler option that would warn that variable 'j' is defined but not used? Best regards No in DMD but you can use [D-Scanner](https://code.dlang.org/packages/dscanner) for that. The check works reasonably as long as the

Re: DMD compiler - warning of unused variables

2021-08-16 Thread jfondren via Digitalmars-d-learn
On Monday, 16 August 2021 at 14:14:27 UTC, DLearner wrote: Hi Please see code below: ``` void main() { import std.stdio; size_t i; size_t j; i = 5; writeln("i = ",i); } ``` Is there a compiler option that would warn that variable 'j' is defined but not used? Best regards

Re: DMD compiler - warning of unused variables

2021-08-16 Thread rikki cattermole via Digitalmars-d-learn
No. https://github.com/dlang-community/D-Scanner#implemented-checks

DMD compiler - warning of unused variables

2021-08-16 Thread DLearner via Digitalmars-d-learn
Hi Please see code below: ``` void main() { import std.stdio; size_t i; size_t j; i = 5; writeln("i = ",i); } ``` Is there a compiler option that would warn that variable 'j' is defined but not used? Best regards

Re: Nondeterministic unittest debugging problem.

2021-08-16 Thread wjoe via Digitalmars-d-learn
On Sunday, 15 August 2021 at 10:32:27 UTC, Rekel wrote: Note you might need to open the screenshots externally, as they are cut off by the forum. This looks like your build system fails to detect file changes and links outdated .o file(s), or library, which causes a mismatch between your debu

Re: Getting a working example of opIndexAssign using opSlice ... have troubles ...

2021-08-16 Thread james.p.leblanc via Digitalmars-d-learn
On Monday, 16 August 2021 at 10:48:19 UTC, Alexandru Ermicioi wrote: On Monday, 16 August 2021 at 06:36:02 UTC, james.p.leblanc wrote: To be honest, I am not exactly sure what is happening here. I am unfamiliar with the "(T : T[])" syntax ... need to read That is template argument secializatio

Re: Getting a working example of opIndexAssign using opSlice ... have troubles ...

2021-08-16 Thread Alexandru Ermicioi via Digitalmars-d-learn
On Monday, 16 August 2021 at 06:36:02 UTC, james.p.leblanc wrote: To be honest, I am not exactly sure what is happening here. I am unfamiliar with the "(T : T[])" syntax ... need to read That is template argument secialization. You're saying that T can be accept only types that are arrays of T

Re: Getting a working example of opIndexAssign using opSlice ... have troubles ...

2021-08-16 Thread Tejas via Digitalmars-d-learn
On Monday, 16 August 2021 at 06:49:08 UTC, james.p.leblanc wrote: On Monday, 16 August 2021 at 06:42:48 UTC, Tejas wrote: If the code works, what's the problem? Hej Again, I was able to construct the working code shown above from help I obtained here in the forum and other resources. My ori