Skip to main content

ChangeExplicitTypeOfAny

A type translator used to change type of Any's, if explicit.

Attributes

AttributeTypeDescription
_type_of_anyintThe target integer representation of the TypeOfAny enum used to replace explicit Any types during type translation.

Constructor

Signature

def ChangeExplicitTypeOfAny(
type_of_any: int
) - > None

Parameters

NameTypeDescription
type_of_anyintThe integer representation of the type to be used for explicit Any types.

Signature

def ChangeExplicitTypeOfAny(
type_of_any: int
) - > null

Parameters

NameTypeDescription
type_of_anyintThe integer representation of the TypeOfAny enum value to apply to explicit Any types

Methods


visit_any()

@classmethod
def visit_any(
t: AnyType
) - > Type

Updates the type of Any to the target value if the current type is marked as explicit, otherwise returns the type unchanged.

Parameters

NameTypeDescription
tAnyTypeThe AnyType instance being visited and potentially modified

Returns

TypeDescription
TypeA copy of the AnyType with the modified type_of_any attribute if it was explicit, or the original type instance