diff --git a/blueprintcompiler/language/values.py b/blueprintcompiler/language/values.py index 74d06f1..f92ba67 100644 --- a/blueprintcompiler/language/values.py +++ b/blueprintcompiler/language/values.py @@ -129,7 +129,7 @@ class IdentValue(Value): def validate_for_type(self): type = self.parent.value_type - if isinstance(type, gir.Enumeration): + if isinstance(type, gir.Enumeration) or isinstance(type, gir.Bitfield): if self.tokens["value"] not in type.members: raise CompileError( f"{self.tokens['value']} is not a member of {type.full_name}", diff --git a/tests/samples/flags.blp b/tests/samples/flags.blp index b185a99..aafda40 100644 --- a/tests/samples/flags.blp +++ b/tests/samples/flags.blp @@ -4,3 +4,7 @@ using Gio 2.0; Gio.Application { flags: is_service | handles_open; } + +EventControllerScroll { + flags: vertical; +} diff --git a/tests/samples/flags.ui b/tests/samples/flags.ui index 62441dd..d2bac55 100644 --- a/tests/samples/flags.ui +++ b/tests/samples/flags.ui @@ -4,4 +4,7 @@ is_service|handles_open + + vertical +