| 296 | } |
| 297 | |
| 298 | Type Validator::GetDeclarationType(const FuncDeclaration& decl) { |
| 299 | if (decl.has_func_type) { |
| 300 | return Type(decl.type_var.index()); |
| 301 | } |
| 302 | if (decl.sig.param_types.empty()) { |
| 303 | if (decl.sig.result_types.empty()) { |
| 304 | return Type::Void; |
| 305 | } |
| 306 | if (decl.sig.result_types.size() == 1) { |
| 307 | return decl.sig.result_types[0]; |
| 308 | } |
| 309 | } |
| 310 | return Type(current_module_->GetFuncTypeIndex(decl)); |
| 311 | } |
| 312 | |
| 313 | Var Validator::GetFuncTypeIndex(const Location& default_loc, |
| 314 | const FuncDeclaration& decl) { |
nothing calls this directly
no test coverage detected