# Static type system

  • Variable types, function calls, operator usage, function declarations, record structures, etc. will be deduced and analyzed at compile time. For incorrect types, compile time will report errors.
  • For variables, the type of the variable in different code positions will be analyzed, and then whether the error is used in different positions, such as whether the type is used correctly, or whether it is used after initialization
  • For function definitions, parameter types and return types are analyzed, as well as static type analysis in the function body
  • For function calls, it will analyze whether the function type matches the actual parameter type used in the current context
  • For the record type, the type of each attribute field will be analyzed
  • Type declarations of variables and function parameters, as well as where constructors are used, check the existence of types, compatibility, etc.