Skip to content

Commit b5e6f5c

Browse files
committed
remove error
1 parent f15dbdb commit b5e6f5c

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

compiler/src/dmd/parse.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5758,7 +5758,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
57585758
}
57595759

57605760
/***
5761-
* Parse an assignment condition for `if`, `switch` or `while` statements.
5761+
* Parse an assignment condition for `if`, `switch`, `while` or `with` statements.
57625762
*
57635763
* Returns:
57645764
* The variable that is declared inside the condition
@@ -5845,7 +5845,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
58455845
param = new AST.Parameter(aloc, storageClass, at, ai, null, null);
58465846
}
58475847
else if (storageClass != 0)
5848-
error("found `%s` while expecting `=` or identifier", n.toChars());
5848+
return null;
58495849

58505850
return param;
58515851
}

compiler/test/fail_compilation/b19730.d

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)