Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
lfun::

Method lfun::cast()


Method cast

mixed cast(string requested_type)

Description

Value cast callback.

Parameter requested_type

Type to cast to.

Returns

Expected to return the object value-casted (converted) to the type described by requested_type .

Note

The argument is currently a string with the name of the type, but might in the future be a value of the type type.

Note

Currently casting between object types is a noop.

Note

If the returned value is not deemed to be of the requested type a runtime error may be thrown.

Note

It's assumed that this function is side-effect free.