From 28594a65a8c5d6b338b024766ea3e5c23c501a68 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 23 Dec 2019 07:05:52 +0300 Subject: [PATCH] fix enum bitfield --- vlib/compiler/enum.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/compiler/enum.v b/vlib/compiler/enum.v index 7e665ae7c2..bd421adf68 100644 --- a/vlib/compiler/enum.v +++ b/vlib/compiler/enum.v @@ -94,7 +94,7 @@ fn (p mut Parser) enum_decl(no_name bool) { if is_flag && !p.first_pass() { p.gen_enum_flag_methods(mut T) } - if p.pass == .decl { + if p.pass == .decl || is_flag { p.table.register_type(T) } // Register `Expression` enum