// 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
// REQUIRES: asserts
enum b<T{var e:d=}typealias d<T where h:T>:N

Add test case for crash triggered in swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const
[swiftc] Add test case for crash triggered in swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const

Stack trace:

```
swift: /path/to/swift/include/swift/AST/Decl.h:2447: swift::Type swift::TypeAliasDecl::getUnderlyingType() const: Assertion `!UnderlyingTy.getType().isNull() && "getting invalid underlying type"' failed.
8  swift           0x00000000010e5c8f swift::Type::transform(llvm::function_ref<swift::Type (swift::Type)>) const + 6879
9  swift           0x00000000010de214 swift::Type::subst(swift::ModuleDecl*, llvm::DenseMap<swift::TypeBase*, swift::Type, llvm::DenseMapInfo<swift::TypeBase*>, llvm::detail::DenseMapPair<swift::TypeBase*, swift::Type> >&, swift::OptionSet<swift::SubstFlags, unsigned int>) const + 68
10 swift           0x0000000000fb51b7 swift::ArchetypeBuilder::mapTypeOutOfContext(swift::ModuleDecl*, swift::GenericParamList*, swift::Type) + 183
16 swift           0x0000000000e8ca96 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
17 swift           0x0000000000eaf832 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 994
18 swift           0x0000000000ce18ff swift::CompilerInstance::performSema() + 3295
20 swift           0x000000000079296b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
21 swift           0x000000000078d5b5 main + 2837
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28287-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28287-swift-type-transform-47ce9c.o
1.	While type-checking 'b' at validation-test/compiler_crashers/28287-swift-type-transform.swift:10:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
