// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
// REQUIRES: asserts
class#^A^#{
protocol e:A
protocol A:A
protocol c:e
Add test case for crash triggered in swift::ConformanceLookupTable::expandImpliedConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*)
[SourceKit] Add test case for crash triggered in swift::ConformanceLookupTable::expandImpliedConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*)

Stack trace:

```
found code completion token A at offset 131
swift-ide-test: /path/to/swift/lib/AST/ConformanceLookupTable.cpp:497: void swift::ConformanceLookupTable::expandImpliedConformances(swift::NominalTypeDecl *, swift::DeclContext *, swift::LazyResolver *): Assertion `i <= 16384 && "Infinite loop due to circular protocol inheritance?"' failed.
8  swift-ide-test  0x0000000000bb3385 swift::ConformanceLookupTable::expandImpliedConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*) + 821
9  swift-ide-test  0x0000000000bb1585 swift::ConformanceLookupTable::updateLookupTable(swift::NominalTypeDecl*, swift::ConformanceLookupTable::ConformanceStage, swift::LazyResolver*) + 1109
10 swift-ide-test  0x0000000000bb4504 swift::ConformanceLookupTable::lookupConformances(swift::NominalTypeDecl*, swift::DeclContext*, swift::LazyResolver*, swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ProtocolDecl*>*, llvm::SmallVectorImpl<swift::ProtocolConformance*>*, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*) + 68
11 swift-ide-test  0x0000000000b7dfc8 swift::DeclContext::getLocalProtocols(swift::ConformanceLookupKind, llvm::SmallVectorImpl<swift::ConformanceDiagnostic>*, bool) const + 136
14 swift-ide-test  0x0000000000930426 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
17 swift-ide-test  0x000000000097743a swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 218
18 swift-ide-test  0x00000000009adebc swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
19 swift-ide-test  0x000000000091603b swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683
21 swift-ide-test  0x0000000000977586 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
22 swift-ide-test  0x00000000008fccbd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1581
23 swift-ide-test  0x000000000076b432 swift::CompilerInstance::performSema() + 2946
24 swift-ide-test  0x0000000000714cc3 main + 33379
Stack dump:
0.	Program arguments: swift-ide-test -code-completion -code-completion-token=A -source-filename=<INPUT-FILE>
1.	While type-checking expression at [<INPUT-FILE>:3:7 - line:6:12] RangeText="{
protocol e:A
protocol A:A
protocol c:e"
2.	While type-checking 'c' at <INPUT-FILE>:6:1
```
