View source code
Display the source code in dmd/dfa/fast/report.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aGitHub 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 usinglocal clone.

Function dmd.dfa.fast.report.DFAReporter.onDereference

Reports an error if a variable is dereferenced while known to be null.

void onDereference(
  DFAConsequence* on,
  ref Loc loc
);

This is triggered by expressions like *ptr or ptr.field when the DFA determines ptr has a Nullable.Null state.

Parameters

NameDescription
on The consequence containing the variable state (must be Nullable).
loc The source location of the dereference.

Authors

Richard (Rikki) Andrew Cattermole

License

Boost License 1.0