From 78249848a11e6c274b7cdbb57127c807551d900f Mon Sep 17 00:00:00 2001 From: CallumDev Date: Wed, 6 Dec 2023 18:10:01 +1030 Subject: [PATCH] MemberUtilities: Use .Value for HasFlag on nullable (Fixes #67) --- src/WattleScript.Interpreter/Tree/MemberUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);