Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Member group

Invoke

Declaring type: FunctionReflection
Module: System.Runtime.Reflection
Assembly: System.Runtime.dll
Source file: FunctionReflection.rvn

Overloads / Variants

Invoke

static func self(function: object?, arguments: object?[]) -> Result<object?, ReflectionError>

Source file: FunctionReflection.rvn

Validates arguments and invokes a bound function.

Parameters

Name Type Description
function Object? The function value, including its bound receiver or captures.
arguments Object?[] Arguments in signature order; use an empty array for no parameters.

Return value

Result<Object?, ReflectionError>

Ok containing the boxed result, reference or null for a no-result call. InvalidReceiver indicates null or a non-function; InvalidArguments indicates an incorrect count or type; UnsupportedType indicates an unsupported signature.

Invoke

static func self<T>(function: T, arguments: object?[]) -> ReturnType<T> where T: func

Source file: FunctionReflection.rvn

Invokes a structural function with the result type projected from its signature.

Parameters

Name Type Description
function T The function value, including its receiver or captures.
arguments Object?[] Nullable references and boxed values in signature order.

Return value

ReturnType<T>

The typed result, or unit after a successful no-result invocation.

Remarks

Development interop overload. Reflection validation failure terminates through carrier extraction; handler failures propagate. Task results are returned unchanged.