Skip to content

Commit

Permalink
Fix an incorrect error message for unary negation
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Oct 9, 2023
1 parent fc027c0 commit ea6cd9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YarnSpinner.Compiler/TypeCheckerListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public override void ExitExpNegative([NotNull] YarnSpinnerParser.ExpNegativeCont
// must also be a number.
context.Type = Types.Number;
IType type = context.expression()?.Type ?? Types.Error;
this.AddEqualityConstraint(type, Types.Number, context, s => $"{context.op.Text} operand must be {Types.Boolean}, not {type.Substitute(s)}");
this.AddEqualityConstraint(type, Types.Number, context, s => $"{context.op.Text} operand must be {Types.Number}, not {type.Substitute(s)}");
}

public override void ExitExpValue([NotNull] YarnSpinnerParser.ExpValueContext context)
Expand Down

0 comments on commit ea6cd9b

Please sign in to comment.