| 1048 | } |
| 1049 | |
| 1050 | void compiler_type::try_fix_this_deduction(cs::tree_type<cs::token_base *>::iterator it) |
| 1051 | { |
| 1052 | if (!it.usable()) |
| 1053 | return; |
| 1054 | token_signal *sig = dynamic_cast<token_signal *>(it.data()); |
| 1055 | if (sig == nullptr || sig->get_signal() != signal_types::dot_) |
| 1056 | return; |
| 1057 | token_id *id = dynamic_cast<token_id *>(it.left().data()); |
| 1058 | if (id == nullptr || id->get_id().get_id() != "this") |
| 1059 | return; |
| 1060 | // Check if it was generated by AST trimmer |
| 1061 | if (it.left().left().usable() && it.left().left().data() != nullptr && |
| 1062 | it.left().left().data() == it.right().data()) { |
| 1063 | // it.data() = it.right().data(); |
| 1064 | throw compile_error(std::string("Symbol collision with structure member \"") + |
| 1065 | static_cast<token_id *>(it.right().data())->get_id().get_id() + "\"."); |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | void compiler_type::import_csym(const std::string &module_path, const std::string &csym_path) |
| 1070 | { |
no test coverage detected