Re: needing to change the order of things at module level = compiler bug, right?

2019-12-12 Thread DanielG via Digitalmars-d-learn

On Thursday, 12 December 2019 at 06:23:31 UTC, Basile B. wrote:

Still worth opening an issue.

https://issues.dlang.org/show_bug.cgi?id=20443


Thanks, Basile. I've added additional information from the github 
thread where the sumtype author helpfully looked into the problem.





Re: needing to change the order of things at module level = compiler bug, right?

2019-12-11 Thread Basile B. via Digitalmars-d-learn

On Sunday, 8 December 2019 at 18:13:59 UTC, DanielG wrote:
On Sunday, 8 December 2019 at 18:01:03 UTC, Steven 
Schveighoffer wrote:
Yes, if it can compile when you move things around, and the 
result is *correct* (very important characteristic)


Indeed, everything's working as intended when rearranged.

Thanks!


Still worth opening an issue.

https://issues.dlang.org/show_bug.cgi?id=20443


Re: needing to change the order of things at module level = compiler bug, right?

2019-12-08 Thread DanielG via Digitalmars-d-learn
On Sunday, 8 December 2019 at 18:01:03 UTC, Steven Schveighoffer 
wrote:
Yes, if it can compile when you move things around, and the 
result is *correct* (very important characteristic)


Indeed, everything's working as intended when rearranged.

Thanks!



Re: needing to change the order of things at module level = compiler bug, right?

2019-12-08 Thread Steven Schveighoffer via Digitalmars-d-learn

On 12/8/19 11:43 AM, DanielG wrote:
I dustmite'd down my problem code, and it seems just changing the order 
of declarations makes the error go away. Specifically, moving a class 
declaration from the bottom of the file, to the top, allows it to 
compile. I also commented on two other things that can be changed to 
make it work - neither seemingly related to the error at hand.


Yes, if it can compile when you move things around, and the result is 
*correct* (very important characteristic), then it's definitely a bug. 
There should be no ordering requirements for module-level code.


-Steve