[ArkTS] Improve error reporting
Need to remove all ThrowTypeError
with LogTypeError
in the following files:
- ir/expressions/memberExpression.cpp
- ir/statements/forOfStatement.cpp
- ir/statements/returnStatement.cpp
- ir/statements/switchCaseStatement.cpp
After it the following steps can be required:
- if we can gurantee that the type will be corrent then we can leave `checker::Type* for example
- if we can't gurantee then we should set TypeError to node.
- Run compiler and parser tests and achieve them not to fail