Here's some simple code to show the problem I am having:
import UIKit
let TEST = true
print(TEST)
#if TEST
print("1. TEST should be true. Value is : ", TEST)
#endif
#if !TEST
print("2. TEST should be false. Value is : ", TEST)
#endif
Regardless of whether TEST is 'true' or 'false', the '#if !TEST' is always executed. The '#if TEST' branch is never executed.
This happens in a Playground and in compiled code. Xcode 9 Beta 5