l0_check_compat.py
Module: l0_check_compat
Source: compiler/stage1_py/l0_check_compat.py Language: Python
Symbols
Namespace l0_check_compat
Class l0_check_compat::TypeCompatibility
Assignment, cast, and scalar type-compatibility rules.
Function l0_check_compat.TypeCompatibility._can_assign
1
bool l0_check_compat.TypeCompatibility._can_assign(self, Type target, Type source, *allow_promotion=False)
Check if ‘source’ type can be assigned to ‘target’ type.
Function l0_check_compat.TypeCompatibility._is_nullable_or_ptr
1
bool l0_check_compat.TypeCompatibility._is_nullable_or_ptr(self, Type t)
Check if type is nullable or a pointer.
Function l0_check_compat.TypeCompatibility._is_int_assignable
1
bool l0_check_compat.TypeCompatibility._is_int_assignable(self, Type|None typ)
Check if type is ‘int’ or ‘byte’.
Function l0_check_compat.TypeCompatibility._get_const_int_for_explicit_cast
1
int | None l0_check_compat.TypeCompatibility._get_const_int_for_explicit_cast(self, Expr expr)
Extract a compile-time integer value from a cast operand when available.
Function l0_check_compat.TypeCompatibility._is_const_null_for_explicit_cast
1
bool l0_check_compat.TypeCompatibility._is_const_null_for_explicit_cast(self, Expr expr)
Check whether a cast operand is provably null at compile time.
Function l0_check_compat.TypeCompatibility._is_bool
1
bool l0_check_compat.TypeCompatibility._is_bool(self, Type|None typ)
Check if type is ‘bool’.
Function l0_check_compat.TypeCompatibility._is_string
1
bool l0_check_compat.TypeCompatibility._is_string(self, NullType|Type typ)
Check if type is ‘string’.
Function l0_check_compat.TypeCompatibility._is_void
1
bool l0_check_compat.TypeCompatibility._is_void(self, Type typ)
Check if type is ‘void’.
Function l0_check_compat.TypeCompatibility._types_equal
1
bool l0_check_compat.TypeCompatibility._types_equal(self, Type a, Type b)
Check if two types are exactly the same.