// This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

// RUN: not --crash %target-swift-frontend %s -parse
struct B<b where T>{{return"class A<b protocol b{
func<b {
func g:BooleanType
struct B{
class A.
struct B{n C{struct B:A<d where f={
{}struct b: A.h: T where g:b{let l=c<d where B{class B<T where k:a()class A{let:A{
class B{
{
{
let a{
if true {class c
class B:a{
let a{let e{let e=b
{
struct c {
if{
class b
struct B:e
if true {}
{
{func a(){{let l=b
import Foundation
if{
enum S<T where k:A{
var f{let a=b where B<T : A{
import Foundation
class A.h:BooleanType
func c
{
let t:b)class g:e
func a{struct S{class c<T where B:a{let:A{
class B{let a {n C{class B<T where k:b)class a(){
func a{func c{
if true {let a(){n C{var f.
{}
import c<T:A.h:b
enum S<b where T:b{
{
class a{
struct g {class A{
{
class A{
func c
let a=b where f={{class B<h
{let a={
var f=b){class b
{e f=i[where[{struct B<b
{struct
if true{struct B<T where h:a{}
class b{let a{
enum S{
var f.
class B<T where T:d
class A{
{
if true {
{
class g:a
import c
class B<T where g:d
typealias F=bhere k:A{return"class B<b
enum b where B:BooleanType

Add test case for crash triggered in swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*)
[swiftc] Add test case for crash triggered in swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*)

Stack trace:

```
4  swift           0x0000000000ed9e0a swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 74
5  swift           0x0000000000edb637 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
6  swift           0x0000000000edb9d6 swift::TypeChecker::validateGenericTypeSignature(swift::GenericTypeDecl*) + 102
7  swift           0x0000000000e9c94f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 367
12 swift           0x0000000000ea2166 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
13 swift           0x0000000000ec4ac2 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1026
14 swift           0x0000000000c58d39 swift::CompilerInstance::performSema() + 3289
16 swift           0x00000000007d73bf swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2863
17 swift           0x00000000007a33d8 main + 2872
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28308-swift-typechecker-checkgenericparamlist.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28308-swift-typechecker-checkgenericparamlist-b4f9c8.o
1.	While type-checking 'B' at validation-test/compiler_crashers/28308-swift-typechecker-checkgenericparamlist.swift:9:1
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
