| ... | ... | @@ -1376,6 +1376,10 @@ static TypeTableEntry *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *c |
| 1376 | 1376 | fn_type_id.return_type = (fn_proto->return_type == nullptr) ? |
| 1377 | 1377 | g->builtin_types.entry_void : analyze_type_expr(g, child_scope, fn_proto->return_type); |
| 1378 | 1378 | |
| 1379 | if (type_is_invalid(fn_type_id.return_type)) { |
| 1380 | return g->builtin_types.entry_invalid; |
| 1381 | } |
| 1382 | |
| 1379 | 1383 | if (fn_type_id.cc != CallingConventionUnspecified && !type_allowed_in_extern(g, fn_type_id.return_type)) { |
| 1380 | 1384 | add_node_error(g, fn_proto->return_type, |
| 1381 | 1385 | buf_sprintf("return type '%s' not allowed in function with calling convention '%s'", |
| ... | ... | @@ -1386,7 +1390,7 @@ static TypeTableEntry *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *c |
| 1386 | 1390 | |
| 1387 | 1391 | switch (fn_type_id.return_type->id) { |
| 1388 | 1392 | case TypeTableEntryIdInvalid: |
| 1389 | | return g->builtin_types.entry_invalid; |
| 1393 | zig_unreachable(); |
| 1390 | 1394 | |
| 1391 | 1395 | case TypeTableEntryIdUndefLit: |
| 1392 | 1396 | case TypeTableEntryIdNullLit: |