Bug 14666, can we prioritize ?
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 10 10:28:52 PDT 2015
On 6/10/2015 5:30 AM, Kenji Hara via Digitalmars-d wrote:
> D has true forward reference resolution mechanism. In that case modules are
> cyclic imported, but the declared symbols don't have actual cyclic references.
> Therefore the snippet should work.
I agree the snippet should work. And I still maintain that cyclical imports are
something worth significant effort to avoid.
But also, dmd doesn't quite have a proper mechanism for resolving forward
references - it's a series of hacks, which is why it's been such a source of bugs.
The right way to do it is to go full lazy on running semantic() on imported
symbols. I did this with enums a while back, and it's been working well.
> https://github.com/D-Programming-Language/dmd/pull/4735
As always, thanks for the quick action!
> And the regression was introduced by your unrelated change. While fixing the
> issue, I couldn't understand why it was necessary.
>
> https://github.com/D-Programming-Language/dmd/commit/a04cf864b932061ad7b72e7cad8b16fabc6a825a
Yeah, it was caused by a hack I put in as yet another hack to deal with forward
references.
More information about the Digitalmars-d
mailing list