View source code
Display the source code in dmd/access.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.

dmd.access.checkAccess - multiple declarations

Function checkAccess

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.

bool checkAccess (
  AggregateDeclaration ad,
  Loc loc,
  dmd.dscope.Scope* sc,
  Dsymbol smember
);

Function checkAccess

Check access to d for expression e.d Returns true if the declaration is not accessible.

bool checkAccess (
  Loc loc,
  dmd.dscope.Scope* sc,
  Expression e,
  Dsymbol d
);

Function checkAccess

Check access to package/module p from scope sc.

bool checkAccess (
  dmd.dscope.Scope* sc,
  Package p
);

Parameters

NameDescription
sc scope from which to access to a fully qualified package name
p the 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).

Authors

Walter Bright

License

Boost License 1.0