View source code
Display the source code in dmd/func.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.
Struct dmd.func.AttributeViolation
Stores a reason why a function failed to infer a function attribute like @safe
or pure
struct AttributeViolation
;
Has two modes:
- a regular safety error, stored in (fmtStr, arg0, arg1)
- a call to a function without the attribute, which is a special case, because in that case,
that function might recursively also have a AttributeViolation
. This way, in case
of a big call stack, the error can go down all the way to the root cause.
The FunctionDeclaration
is then stored in arg0
and fmtStr
must be null
.
Fields
Name | Type | Description |
---|---|---|
arg0
|
RootObject | Arguments for up to two %s format specifiers in format string
|
arg1
|
RootObject | Arguments for up to two %s format specifiers in format string
|
arg2
|
RootObject | Arguments for up to two %s format specifiers in format string
|
fmtStr
|
const(char)* | printf-style format string |
loc
|
Loc | location of error |
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.