Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 846 - Error 42: Symbol Undefined "<mangle_of_class_template>__arrayZ" #3552

Merged
merged 2 commits into from May 17, 2014

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented May 17, 2014

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

It's separated from #2561. Even if an instantiated template is defined in non-root module, generate _array, __assert, and __unittest_fail for the module in COMDAT section.

@MartinNowak
Copy link
Member

Auto-merge toggled on

@@ -561,27 +561,14 @@ void TemplateDeclaration::semantic(Scope *sc)
Type::rtinfo = this;
}

if (sc->module)
if (Module *m = sc->module) // should use getModule() instead?
{
// Generate this function as it may be used
// when template is instantiated in other modules
// even if bounds checking is disabled in this module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update comment to

Generate these functions as they may be used
when template is instantiated in other modules.
Even if assertions or bounds checking are
disabled in this module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

9rnsr added 2 commits May 18, 2014 00:24
…>__arrayZ"

Stop using ModuleInfo for assertion and array bounds check.
Instead pass filename to `_d_assert`, `_d_unittest`, and `_d_arraybounds`.
MartinNowak added a commit that referenced this pull request May 17, 2014
Issue 846 - Error 42: Symbol Undefined "<mangle_of_class_template>__arrayZ"
@MartinNowak MartinNowak merged commit 40be370 into dlang:master May 17, 2014
@9rnsr
Copy link
Contributor Author

9rnsr commented May 17, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants