tuple detection does not require AST node

This commit is contained in:
Andrew Kelley
2019-12-08 18:39:52 -05:00
parent d5e788072d
commit 6504c5098e
6 changed files with 42 additions and 23 deletions

View File

@@ -744,7 +744,7 @@ static void anal_dump_type(AnalDumpCtx *ctx, ZigType *ty) {
case ZigTypeIdEnumLiteral:
break;
case ZigTypeIdStruct: {
if (ty->data.structure.is_slice) {
if (ty->data.structure.special == StructSpecialSlice) {
jw_object_field(jw, "len");
jw_int(jw, 2);
anal_dump_pointer_attrs(ctx, ty->data.structure.fields[slice_ptr_index]->type_entry);