Since Xcode 7 and Swift 2.0, in my current project, I get the error above :
Assertion failed: (Conformance.size() == Archetype->getConformsTo().size() && "substitution conformances don't match archetype"), function Substitution, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.38.1/src/swift/lib/AST/Substitution.cpp, line 64.
0 swift 0x0000000111d84e0b llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x0000000111d8554b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff8bcc7f1a _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1949532416
4 libsystem_c.dylib 0x00007fff89e58b53 abort + 129
5 libsystem_c.dylib 0x00007fff89e20c39 basename + 0
6 swift 0x0000000110557c9f swift::Substitution::Substitution(swift::ArchetypeType*, swift::Type, llvm::ArrayRef<swift::ProtocolConformance*>) + 271
7 swift 0x0000000110269fa0 swift::SILCloner<swift::SILInliner>::getOpConformances(swift::ArchetypeType*, swift::CanType, llvm::ArrayRef<swift::ProtocolConformance*>) + 256
8 swift 0x0000000110263235 swift::SILCloner<swift::SILInliner>::visitInitExistentialRefInst(swift::InitExistentialRefInst*) + 133
9 swift 0x000000011025831b swift::SILCloner<swift::SILInliner>::visitSILBasicBlock(swift::SILBasicBlock*) + 75
10 swift 0x00000001102574e1 swift::SILInliner::inlineFunction(swift::FullApplySite, llvm::ArrayRef<swift::SILValue>) + 897
11 swift 0x00000001100c92d3 (anonymous namespace)::SILPerformanceInlinerPass::run() + 9427
12 swift 0x000000011007d9a8 swift::SILPassManager::runOneIteration() + 2072
13 swift 0x000000011007a4c8 swift::runSILOptimizationPasses(swift::SILModule&) + 424
14 swift 0x000000010fd9e83f performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 9583
15 swift 0x000000010fd9c0b3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2515
16 swift 0x000000010fd9828f main + 1983
17 libdyld.dylib 0x00007fff87ca05c9 start + 1
Stack dump:
If I set the Optimisation Level to "None", it works, but with optimisation ( by default), it shows me this.