[SR-6105] Combination of generics, enums, and autoclosures can produce an undefined symbol #48660
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
Attachment: Download
Environment
Xcode 9.1 beta 1 or beta 2. This worked OK in Xcode 9.0.
Additional Detail from JIRA
md5: fe8747ed0afe722e4affab938c9b4159
Issue Description:
Some combination of generics and enums can produce an undefined symbol between two different targets (in this case, a unit test and a framework).
Steps to reproduce:
Download and unzip the attached example
Open OmniGroup/Workspaces/OmniJS.xcworkspace
cmd-u to build and test
Expected result:
Actual result:
Undefined symbols for architecture x86_64:
"__T0So12NSColorSpaceC5ModelOs16RawRepresentable6OmniJSWP", referenced from:
_T011OmniJSTests9EnumTestsC9testValueyyFSbyKXKfu in EnumTests.o
__T0So12NSColorSpaceC5ModelOs9Equatable6AppKitsAEP2eeoiSbx_xtFZTW in EnumTests.o
Notes:
The test that gets the undefined symbol doesn't actually use any of the generics goop.
The test has a second file that just imports the framework; if that import is removed, the bug doesn't happen
If the reference to the enum is made outside of the XCTAssert, the problem doesn't happen.
The text was updated successfully, but these errors were encountered: