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

Module ddmd.dcast

Compiler implementation of the D programming language.

Functions

Name Description
arrayTypeCompatible See if both types are arrays that can be compared for equality. Return true if so. If they are arrays, but incompatible, issue error. This is to enable comparing things like an immutable array with a mutable one.
arrayTypeCompatibleWithoutCasting See if both types are arrays that can be compared for equality without any casting. Return true if so. This is to enable comparing things like an immutable array with a mutable one.
castTo Do an explicit cast. Assume that the 'this' expression does not have any indirections.
getIntRange
implicitCastTo Do an implicit cast. Issue error if it can't be done.
implicitConvTo Return MATCH level of implicitly converting e to type t. Don't do the actual cast; don't change e.
inferType Set type inference target t Target type flag 1: don't put an error when inference fails
integralPromotions Do integral promotions (convertchk). Don't convert to
isVoidArrayLiteral Return true if e is an empty array literal with dimensionality equal to or less than type of other array. [], [[]], [[[]]], etc. I.e., make sure that [1,2] is compatible with [], [[1,2]] is compatible with [[]], etc.
scaleFactor Scale addition/subtraction to/from pointer.
typeCombine Bring leaves to common type.
typeMerge Combine types.

Authors

Walter Bright

License

Boost License 1.0

Comments