Has anyone else seen anything like this?
Assertion failed: (D->getSourceRange().isValid()), function buildDeclarationRefinementContext, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.38.1/src/swift/lib/Sema/TypeChecker.cpp, line 946.
0 swift 0x0000000109a08e0b llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x0000000109a0954b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff8b16cf1a _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1961439488
4 libsystem_c.dylib 0x00007fff96a5bb53 abort + 129
5 libsystem_c.dylib 0x00007fff96a23c39 basename + 0
6 swift 0x000000010806de92 (anonymous namespace)::TypeRefinementContextBuilder::walkToDeclPre(swift::Decl*) + 1058
7 swift 0x000000010813cf5d (anonymous namespace)::Traversal::doIt(swift::Decl*) + 157
8 swift 0x0000000108141244 (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 164
9 swift 0x000000010813cfb2 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 242
10 swift 0x000000010813ceab swift::Decl::walk(swift::ASTWalker&) + 27
11 swift 0x0000000108067a19 swift::TypeChecker::buildTypeRefinementContextHierarchy(swift::SourceFile&, unsigned int) + 329
12 swift 0x000000010806750d swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1213
13 swift 0x0000000107e7a635 swift::CompilerInstance::performSema() + 4341
14 swift 0x0000000107a205b0 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 736
15 swift 0x0000000107a200b3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2515
16 swift 0x0000000107a1c28f main + 1983
17 libdyld.dylib 0x00007fff88fcb5c9 start + 1
It seems to be caused by a no longer included SWIFT_WHOLE_MODULE_OPTIMIZATION = YES in the User Defined build settings.
Using the new build option for Whole Module Optimization results in the same crash.
Filed: rdar://21365971