Closed mura-admin closed 6 years ago
What line in our source code hits this?
The compiler hits an assertion and doesn't appear to give any further info as to the source. From a comment in the swift compiler bug report it suggests that it originates from this pull request: https://github.com/apple/swift-nio/pull/374.
Let me see if I can reproduce with the most recent 4.2 toolchain from swift.org.
Him, I haven't been able to successfully work around this. I can definitely reproduce it, but haven't successfully worked around it. I'll take in @weissi on Monday.
@mura-admin Thanks for reporting! @mura-admin / @Lukasa yes, that's a known Swift 4.2 bug and I contacted the Swift team, it'll be fixed very soon. It's this bug: https://bugs.swift.org/browse/SR-6963 . There's a workaround that I'll put in if not fixed early next week because it's annoying.
@mura-admin sorry, should've read the whole bug report. I think this might work as a workaround:
public typealias RangeType<T> = Range<T>
in the two places where currently we have
public typealias RangeType = Range
Let me check if that works, just need to switch machines.
I tried that, and was unable to get that to work.
@mura-admin / @Lukasa this works: https://github.com/apple/swift-nio/pull/420
Expected behavior
To build successfully in Xcode
Actual behavior
Hit a Swift 4.2 bug/error: Assertion failed: ((allowTypeAliasXRef || !isa(D) || D->getModuleContext() == M) && "cannot cross-reference typealiases directly (use the NameAliasType)"), function addDeclRef, file /Users/buildnode/jenkins/workspace/oss-swift-4.2-package-osx/swift/lib/Serialization/Serialization.cpp, line 614.
I understand this is related to a compiler bug: https://bugs.swift.org/browse/SR-6963. Is there a workaround for this in the meantime?
Steps to reproduce
SwiftNIO version/commit hash
?
Swift & OS version (output of
swift --version && uname -a
)Latest MacOS and Swift 4.2 beta