{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/1665","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/1665/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/1665/comments","events_url":"https://api.github.com/repos/apple/swift/issues/1665/events","html_url":"https://github.com/apple/swift/pull/1665","id":140478003,"number":1665,"title":"[swiftc] Add test case for crash triggered in swift::Type::transform(…)","user":{"login":"practicalswift","id":7826565,"avatar_url":"https://avatars.githubusercontent.com/u/7826565?v=3","gravatar_id":"","url":"https://api.github.com/users/practicalswift","html_url":"https://github.com/practicalswift","followers_url":"https://api.github.com/users/practicalswift/followers","following_url":"https://api.github.com/users/practicalswift/following{/other_user}","gists_url":"https://api.github.com/users/practicalswift/gists{/gist_id}","starred_url":"https://api.github.com/users/practicalswift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/practicalswift/subscriptions","organizations_url":"https://api.github.com/users/practicalswift/orgs","repos_url":"https://api.github.com/users/practicalswift/repos","events_url":"https://api.github.com/users/practicalswift/events{/privacy}","received_events_url":"https://api.github.com/users/practicalswift/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-13T11:45:17Z","updated_at":"2016-03-13T20:05:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/1665","html_url":"https://github.com/apple/swift/pull/1665","diff_url":"https://github.com/apple/swift/pull/1665.diff","patch_url":"https://github.com/apple/swift/pull/1665.patch"},"body":"<!-- Please complete this template before creating pull request. -->\r\n#### What's in this pull request?\r\nCrash case with stack trace:\r\n\r\n```\r\nswift: /path/to/llvm/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<swift::SILFunctionType, const swift::TypeBase *>::doit(const From *) [To = swift::SILFunctionType, From = const swift::TypeBase *]: Assertion `Val && \"isa<> used on a null pointer\"' failed.\r\n9  swift           0x0000000001096f1d swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 45\r\n10 swift           0x000000000109156f 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 + 111\r\n13 swift           0x0000000000e8a11e swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 254\r\n14 swift           0x0000000001087d46 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150\r\n15 swift           0x0000000001087c88 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40\r\n16 swift           0x0000000001088486 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6\r\n17 swift           0x0000000000e8210f swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 1071\r\n19 swift           0x0000000000eabdee swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158\r\n21 swift           0x0000000000eacd04 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164\r\n22 swift           0x0000000000eabcea swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42\r\n27 swift           0x0000000000e47556 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150\r\n30 swift           0x0000000000ea5a5a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346\r\n31 swift           0x0000000000ea58be swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46\r\n32 swift           0x0000000000ea6458 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136\r\n34 swift           0x0000000000e6a9f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300\r\n35 swift           0x0000000000cbcedf swift::CompilerInstance::performSema() + 3087\r\n37 swift           0x000000000078b6ff frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2495\r\n38 swift           0x00000000007861c5 main + 2837\r\nStack dump:\r\n0.\tProgram arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28268-swift-type-transform.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28268-swift-type-transform-b6bd0e.o\r\n1.\tWhile type-checking declaration 0x648dd80 at validation-test/compiler_crashers/28268-swift-type-transform.swift:10:5\r\n2.\tWhile type-checking 'a' at validation-test/compiler_crashers/28268-swift-type-transform.swift:10:6\r\n3.\tWhile resolving type A.e at [validation-test/compiler_crashers/28268-swift-type-transform.swift:11:13 - line:11:15] RangeText=\"A.e\"\r\n<unknown>:0: error: unable to execute command: Aborted\r\n<unknown>:0: error: compile command failed due to signal (use -v to see invocation)\r\n```\r\n\r\n#### Resolved bug number: ([SR-](https://bugs.swift.org/browse/SR-))\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n **Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/196043967","html_url":"https://github.com/apple/swift/pull/1665#issuecomment-196043967","issue_url":"https://api.github.com/repos/apple/swift/issues/1665","id":196043967,"user":{"login":"tkremenek","id":3087023,"avatar_url":"https://avatars.githubusercontent.com/u/3087023?v=3","gravatar_id":"","url":"https://api.github.com/users/tkremenek","html_url":"https://github.com/tkremenek","followers_url":"https://api.github.com/users/tkremenek/followers","following_url":"https://api.github.com/users/tkremenek/following{/other_user}","gists_url":"https://api.github.com/users/tkremenek/gists{/gist_id}","starred_url":"https://api.github.com/users/tkremenek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkremenek/subscriptions","organizations_url":"https://api.github.com/users/tkremenek/orgs","repos_url":"https://api.github.com/users/tkremenek/repos","events_url":"https://api.github.com/users/tkremenek/events{/privacy}","received_events_url":"https://api.github.com/users/tkremenek/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T20:05:36Z","updated_at":"2016-03-13T20:05:36Z","body":"@swift-ci Please smoke test"}}