Skip to content

Commit

Permalink
MemberUtilities: Use .Value for HasFlag on nullable (Fixes #67)
Browse files Browse the repository at this point in the history
  • Loading branch information
CallumDev committed Dec 6, 2023
1 parent 50e7a07 commit 7824984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WattleScript.Interpreter/Tree/MemberUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7824984

Please sign in to comment.