From b55b1ffe14bc4a7459cd9b9bdb8b9b0c8f7f8091 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 11 Nov 2018 17:08:30 +0000 Subject: `opaque` keyword and type --- src/check_type.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index f38826a25..5bb404ae8 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2341,6 +2341,13 @@ bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, Type *named_t return true; case_end; + case_ast_node(ot, OpaqueType, e); + Type *elem = strip_opaque_type(check_type(ctx, ot->type)); + *type = alloc_type_opaque(elem); + set_base_type(named_type, *type); + return true; + case_end; + case_ast_node(at, ArrayType, e); if (at->count != nullptr) { Operand o = {}; -- cgit v1.2.3