Created
July 26, 2016 21:01
-
-
Save UplinkCoder/ca2da4abc3c4891ed0d8ef3cf093ea7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dtemplate.d b/src/dtemplate.d | |
index d90d25c..d3c1587 100644 | |
--- a/src/dtemplate.d | |
+++ b/src/dtemplate.d | |
@@ -7943,8 +7943,8 @@ extern (C++) class TemplateInstance : ScopeDsymbol | |
Declaration d = sa.isDeclaration(); | |
if ((td && td.literal) || (ti && ti.enclosing) || (d && !d.isDataseg() && !(d.storage_class & STCmanifest) && (!d.isFuncDeclaration() || d.isFuncDeclaration().isNested()) && !isTemplateMixin())) | |
{ | |
- // if module level template | |
- if (isstatic) | |
+ // if module level template or if nestedFunction does not need a context | |
+ if (isstatic || (d.isFuncDeclaration() && !d.isFuncDeclaration().isNested())) | |
{ | |
Dsymbol dparent = sa.toParent2(); | |
if (!enclosing) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment