If Swift optimisation is set to None for Module B the app compiles. If it's set to -O fails with error:
Undefined symbols for architecture x86_64:
"protocol witness table for __C.UIControlState : Swift.Equatable in UIKit", referenced from:
function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of generic specialization <__C.UIControlState, Swift.String> of static (extension in Swift):Swift._NativeDictionaryBuffer< where A: Swift.Hashable>.fromArray([(A, B)]) -> Swift._NativeDictionaryBuffer<A, B> in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Attachment: Download
Environment
Xcode 9.3, Xcode 9.4 Target: iOS simulator, any device MacOS 10.13.4Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 273257dafa930bf84c29e4a65beb1213Issue Description:
Module A provides a protocol conformance for UIKit type
Module B makes use of that type
If Swift optimisation is set to None for Module B the app compiles. If it's set to -O fails with error:
Example project attached