View source code
							
							
						
								Display the source code in dmd/dsymbol.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Function dmd.dsymbol.Dsymbol.toParentDecl
parent field returns a lexically enclosing scope symbol this is a member of.
						
					
				toParent() returns a logically enclosing scope symbol this is a member of.
 It skips over TemplateMixin's.
 toParent2() returns an enclosing scope symbol this is living at runtime.
 It skips over both TemplateInstance's and TemplateMixin's.
 It's used when looking for the 'this' pointer of the enclosing function/class.
 toParentDecl() similar to toParent2() but always follows the template declaration scope
 instead of the instantiation scope.
 toParentLocal() similar to toParentDecl() but follows the instantiation scope
 if a template declaration is non-local i.e. global or static.
Examples
module mod;
template Foo(alias a) { mixin Bar!(); }
mixin template Bar() {
  public {  // VisibilityDeclaration
    void baz() { a = 2; }
  }
}
void test() {
  int v = 1;
  alias foo = Foo!(v);
  fooAuthors
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.