aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-11-11 17:08:30 +0000
committergingerBill <bill@gingerbill.org>2018-11-11 17:08:30 +0000
commitb55b1ffe14bc4a7459cd9b9bdb8b9b0c8f7f8091 (patch)
tree77df172a7e387801f9f43999dcc412a6fb5b71be /src/check_type.cpp
parent620d5d34f7c5712be27a92e1ab6ab48119f0a4c6 (diff)
`opaque` keyword and type
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp7
1 files changed, 7 insertions, 0 deletions
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 = {};