[SR-3663] Successful '||' ignores rest of expression in conditional compilation directive #46248
Labels
accepts invalid
Bug: Accepts invalid
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
parser
Area → compiler: The legacy C++ parser
Environment
Xcode Version 8.2.1 (8C1002)
Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 7097303969b0da5727e851a9bfec453c
relates to:
Issue Description:
This code compiles, and prints
true
.Even if the syntax is OK, this is evaluated to
true
Two problems here:
Precedence of
&&
should be higher than||
.Whole syntax should be validated even if
||
expression is resulted to success.The text was updated successfully, but these errors were encountered: