[SR-2404] Swift silently doesn't use -D flag if you assign a value to it (e.g. -DDEBUG=1) #45011
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
good first issue
Good for newcomers
Additional Detail from JIRA
md5: a01133e8f636613e7b7012a9ceb819d8
Issue Description:
If people use non-identifier -D flags with Swift assuming that it works the same as C, the compiler just throws that away. (Actually, it's probably dutifully adding a custom condition that just can't ever be typed.) We should produce an error on a non-identifier -D flag (as determined by
Lexer::isIdentifier
), possibly with special cases for=
.The text was updated successfully, but these errors were encountered: