diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-08-16 23:24:33 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-08-16 23:24:33 -0700 |
| commit | 0fbb9e09ea89ea24ec214b244e1de9574516c74c (patch) | |
| tree | 49f3de24d33fe361500e0400215aea73326d7700 /src/analyze.cpp | |
| parent | a2ac06dcd506fd5e119e4eb8e1de201fefa05bbc (diff) | |
| download | zig-0fbb9e09ea89ea24ec214b244e1de9574516c74c.tar.gz zig-0fbb9e09ea89ea24ec214b244e1de9574516c74c.zip | |
fix crash when calling method on slice
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 4e4655c99c..5f4e229f7e 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2686,7 +2686,7 @@ static TypeTableEntry *analyze_field_access_expr(CodeGen *g, ImportTableEntry *i node->data.field_access_expr.type_struct_field = find_struct_type_field(bare_struct_type, field_name); if (node->data.field_access_expr.type_struct_field) { return node->data.field_access_expr.type_struct_field->type_entry; - } else if (wrapped_in_fn_call) { + } else if (wrapped_in_fn_call && !is_slice(bare_struct_type)) { BlockContext *container_block_context = get_container_block_context(bare_struct_type); assert(container_block_context); auto entry = container_block_context->decl_table.maybe_get(field_name); |
