-
Couldn't load subscription status.
- Fork 10.6k
Closed
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfparserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parser
Description
| Previous ID | SR-3663 |
| Radar | rdar://21692106 |
| Original Reporter | @rintaro |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
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
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, AcceptsInvalid, Parser |
| Assignee | @rintaro |
| Priority | Medium |
md5: 7097303969b0da5727e851a9bfec453c
relates to:
- SR-3455 Evaluation and Validation of Build Conditions Should Be Separate
Issue Description:
This code compiles, and prints true.
#if false || true && os(99.0) || Whoops (try Anything) is OK?
print(true)
#endifEven if the syntax is OK, this is evaluated to true
#if false || true && false
print(true)
#endifTwo problems here:
-
Precedence of
&&should be higher than||. -
Whole syntax should be validated even if
||expression is resulted to success.
Metadata
Metadata
Assignees
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfparserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parser