diff --git a/src/WattleScript.Interpreter/Tree/MemberUtilities.cs b/src/WattleScript.Interpreter/Tree/MemberUtilities.cs index dd0efd87..0c550735 100644 --- a/src/WattleScript.Interpreter/Tree/MemberUtilities.cs +++ b/src/WattleScript.Interpreter/Tree/MemberUtilities.cs @@ -39,7 +39,7 @@ public static void AddModifierFlag(ref MemberModifierFlags source, Token token, foreach (var combo in flagConflicts) { - if (combo.appliesTo.HasFlag(memberType) && source.HasFlag(combo.a) && (combo.b == null || source.HasFlag(combo.b))) + if (combo.appliesTo.HasFlag(memberType) && source.HasFlag(combo.a) && (combo.b == null || source.HasFlag(combo.b.Value))) { if (combo.msg != null) throw new SyntaxErrorException(token, combo.msg);