SR-826 Conditional compilation over methods seem to do syntax check but only a simple one
Issue Description:
Overloading a method seems to break when using a build configuration (and the build configuration is NOT defined). In the following code the SCOOBY_DOO command line flag was not passed:
main.swift:11:8: error: definition conflicts with previous value
func log(responseData: NSData) {
^
main.swift:7:8: note: previous definition of 'log' is here
func log(urlRequest: NSURLRequest) {
^
main.swift:15:8: error: definition conflicts with previous value
func log(error: NSError) {
^
main.swift:7:8: note: previous definition of 'log' is here
func log(urlRequest: NSURLRequest) {
^
Note that if SCOOBY_DOO is defined, then the code compiles. Also, this works in either case if these methods are not inside of a type and simply top level functions. It also works if you individually wrap each overloaded method with the build configuration flag like this:
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | MonocularVision (JIRA) | |Priority | Medium | md5: 1d9231862676d4fba1627315856a860bduplicates:
Issue Description:
Overloading a method seems to break when using a build configuration (and the build configuration is NOT defined). In the following code the SCOOBY_DOO command line flag was not passed:
The code fails with:
Note that if SCOOBY_DOO is defined, then the code compiles. Also, this works in either case if these methods are not inside of a type and simply top level functions. It also works if you individually wrap each overloaded method with the build configuration flag like this: