[SR-11842] All paths through this function will call itself with #available not giving warning for other path. #54247
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
SILOptimizer
Area → compiler: SIL optimization passes
Environment
Xcode version: 11.2.1 (11B500)
Swift version: 5.1
Additional Detail from JIRA
md5: 63c1f01418371041d642bf847d24c120
Issue Description:
For supporting new dark mode for iOS 13, using UIColor extension for the bifurcation of colors for other OS version as below.
Here I get a typo for OS version not iOS 13, and will result in crash at run-time.
While if we try to write as below:
Here we get compile-time warning saying
All paths through this function will call itself
.Expected Result:
The text was updated successfully, but these errors were encountered: