Skip to content

Fix Issue 17452 - Undefined references in std.container.array#5432

Merged
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:fix-17452
May 29, 2017
Merged

Fix Issue 17452 - Undefined references in std.container.array#5432
dlang-bot merged 1 commit intodlang:masterfrom
wilzbach:fix-17452

Conversation

@wilzbach
Copy link
Contributor

@wilzbach wilzbach commented May 29, 2017

As long as DIP82 isn't implemented, it's a pretty bad idea to use unittest blocks within a templated aggregate.
This is one of the few small things that broke Vibe.d and the Dlang-Tour with dmd-nightly ...

CC @ZombineDev

The linker error can be observed starting with #5295

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
17452 Undefined references in std.container.array

@JackStouffer
Copy link
Contributor

This has the added benefit of reducing compile times, yeah?

@wilzbach
Copy link
Contributor Author

This has the added benefit of reducing compile times, yeah?

Yes, but I think this is marginal compared to all the crazy CTFE-stuff that we do in other modules ;-)

All in all I do have the opinion that such errors should be detected/warned by a compiler, but this way seemed a lot easier to go than reducing entire Vibe.d again.

@dlang-bot dlang-bot merged commit d4cb5e6 into dlang:master May 29, 2017
@PetarKirov
Copy link
Member

Thanks for tracking down linker errors @wilzbach!

If those were documented unittests, I would have suggested​ using the static if (doDocUnittests) trick, but since that's not the case, moving them outside is a better solution, so LGTM as well. Actually I don't know if that trick would have fixed the problem. It looks #5295 exposed a compiler bug, since there's no apparent reason for the linker errors.

@wilzbach wilzbach deleted the fix-17452 branch December 11, 2017 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants