Skip to content

Commit

Permalink
review request
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Jan 1, 2024
1 parent 6bb5dfd commit 7155fdc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions DMCompiler/Compiler/DM/DMParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ private DMASTProcStatementSet[] ProcSetEnd(bool allowMultiple) {
Error("Expected a condition");
}
if (condition is DMASTAssign) {
DMCompiler.Emit(WarningCode.AssignmentInConditional, Current().Location, "Assignment in conditional");
DMCompiler.Emit(WarningCode.AssignmentInConditional, condition.Location, "Assignment in conditional");
}
BracketWhitespace();
ConsumeRightParenthesis();
Expand Down Expand Up @@ -1382,9 +1382,6 @@ public DMASTProcStatementSwitch.SwitchCase[] SwitchInner() {

break;
}
if (expression is DMASTAssign) {
DMCompiler.Emit(WarningCode.AssignmentInConditional, Current().Location, "Assignment in conditional");
}

if (Check(TokenType.DM_To)) {
Whitespace();
Expand Down

0 comments on commit 7155fdc

Please sign in to comment.