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
			a local clone.
		
	dmd.access
Enforce visibility contrains such as public and private.
Specification Visibility Attributes
Authors: 
License: 
Source access.d
Documentation https://dlang.org/phobos/dmd_access.html
- boolcheckAccess(AggregateDeclarationad, Locloc, Scope*sc, Dsymbolsmember);
- Do access check for member of this class, this class being the type of the 'this' pointer used to access smember. Returns true if the member is not accessible.
- boolcheckAccess(Locloc, Scope*sc, Expressione, Dsymbold);
- Check access to d for expression e.d Returns true if the declaration is not accessible.
- boolcheckAccess(Scope*sc, Packagep);
- Check access to package/modulepfrom scopesc.Parameters:Scope* scscope from which to access to a fully qualified package name Package pthe package/module to check access for Returns:true if the package is not accessible. Because a global symbol table tree is used for imported packages/modules, access to them needs to be checked based on the imports in the scope chain (see https://issues.dlang.org/show_bug.cgi?id=313).
- boolsymbolIsVisible(Modulemod, Dsymbols);
- Check whether symbolssis visible inmod.Parameters:Module modlookup origin Dsymbol ssymbol to check for visibility Returns:true if s is visible in mod
- boolsymbolIsVisible(Dsymbolorigin, Dsymbols);
- Same as above, but determines the lookup module from symbolsorigin.
- boolsymbolIsVisible(Scope*sc, Dsymbols);
- Same as above but also checks for protected symbols visible from scopesc. Used for qualified name lookup.Parameters:Scope* sclookup scope Dsymbol ssymbol to check for visibility Returns:true if s is visible by origin
- boolcheckSymbolAccess(Scope*sc, Dsymbols);
- Check if a symbol is visible from a given scope without taking into account the most visible overload.Parameters:Scope* sclookup scope Dsymbol ssymbol to check for visibility Returns:true if s is visible by origin
- DsymbolmostVisibleOverload(Dsymbols, Modulemod= null);
- Use the most visible overload to check visibility. Later perform an access check on the resolved overload. This function is similar to overloadApply, but doesn't recurse nor resolve aliases because visibility is an attribute of the alias not the aliasee.
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Mar 31 10:27:43 2025