// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
// REQUIRES: asserts
protocol A{enum B<T{case func P{#^A^#
Add test case for crash triggered in swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*)
[SourceKit] Add test case for crash triggered in swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*)

Stack trace:

```
found code completion token A at offset 158
swift-ide-test: /path/to/swift/lib/Sema/CSApply.cpp:148: swift::Type swift::constraints::Solution::computeSubstitutions(swift::Type, swift::DeclContext *, swift::Type, swift::constraints::ConstraintLocator *, SmallVectorImpl<swift::Substitution> &) const: Assertion `(conforms || firstArchetype->getIsRecursive() || isOpenedAnyObject(replacement) || replacement->is<GenericTypeParamType>()) && "Constraint system missed a conformance?"' failed.
13 swift-ide-test  0x000000000095ce72 swift::TypeChecker::resolveWitness(swift::NormalProtocolConformance const*, swift::ValueDecl*) + 658
14 swift-ide-test  0x0000000000b8268b swift::NormalProtocolConformance::getWitness(swift::ValueDecl*, swift::LazyResolver*) const + 171
15 swift-ide-test  0x0000000000bbb60b swift::ConformanceLookupTable::getSatisfiedProtocolRequirementsForMember(swift::ValueDecl const*, swift::NominalTypeDecl*, swift::LazyResolver*, bool) + 651
16 swift-ide-test  0x0000000000b39565 swift::ValueDecl::getSatisfiedProtocolRequirements(bool) const + 85
17 swift-ide-test  0x00000000007b8dfa swift::ide::walkOverriddenDecls(swift::ValueDecl const*, std::function<void (llvm::PointerUnion<swift::ValueDecl const*, clang::NamedDecl const*>)>) + 138
18 swift-ide-test  0x0000000000773a56 copyAssociatedUSRs(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&, swift::Decl const*) + 166
19 swift-ide-test  0x0000000000774198 swift::ide::CodeCompletionResultBuilder::takeResult() + 1624
23 swift-ide-test  0x0000000000b57a0d swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1117
32 swift-ide-test  0x0000000000ae2154 swift::Decl::walk(swift::ASTWalker&) + 20
33 swift-ide-test  0x0000000000b6be0e swift::SourceFile::walk(swift::ASTWalker&) + 174
34 swift-ide-test  0x0000000000b6b03f swift::ModuleDecl::walk(swift::ASTWalker&) + 79
35 swift-ide-test  0x0000000000b451a2 swift::DeclContext::walkContext(swift::ASTWalker&) + 146
36 swift-ide-test  0x000000000085cd1a swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 138
37 swift-ide-test  0x000000000076bb24 swift::CompilerInstance::performSema() + 3316
38 swift-ide-test  0x00000000007152b7 main + 33239
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While walking into decl 'A' at <INPUT-FILE>:3:1
```
