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

Given var, get the right this pointer if var is in an outer class, but our existing this pointer is in an inner class.

extern(C++) Expression getRightThis (
  ref const(dmd.globals.Loc) loc,
  dmd.dscope.Scope* sc,
  AggregateDeclaration ad,
  Expression e1,
  Declaration var,
  int flag = 0
);

Parameters

NameDescription
loc location to use for error messages
sc context
struct or class we need the correct this for
e1 existing this
var the specific member of ad we're accessing
flag if true, return null instead of throwing an error

Returns

Expression representing the this for the var

Authors

Walter Bright

License

Boost License 1.0