Skip to content

Commit ec90c5d

Browse files
[SourceKit] Add test case for crash triggered in llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
Stack trace: ``` found code completion token A at offset 158 Polymorphic function type should have been opened UNREACHABLE executed at /path/to/swift/lib/Sema/CSSimplify.cpp:1524! 6 swift-ide-test 0x0000000002a6564d llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461 7 swift-ide-test 0x00000000008d8cde swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::TypeMatchKind, unsigned int, swift::constraints::ConstraintLocatorBuilder) + 15374 8 swift-ide-test 0x00000000008e1a9f swift::constraints::ConstraintSystem::simplifyConstraint(swift::constraints::Constraint const&) + 639 9 swift-ide-test 0x00000000009a5f67 swift::constraints::ConstraintSystem::addConstraint(swift::constraints::Constraint*, bool, bool) + 23 10 swift-ide-test 0x0000000000919983 swift::TypeChecker::typesSatisfyConstraint(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::DeclContext*) + 131 11 swift-ide-test 0x00000000008ff59b swift::isConvertibleTo(swift::Type, swift::Type, swift::DeclContext*) + 75 13 swift-ide-test 0x000000000077406c swift::ide::CodeCompletionResultBuilder::takeResult() + 1324 17 swift-ide-test 0x0000000000b576c6 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 278 28 swift-ide-test 0x0000000000ae2154 swift::Decl::walk(swift::ASTWalker&) + 20 29 swift-ide-test 0x0000000000b6be0e swift::SourceFile::walk(swift::ASTWalker&) + 174 30 swift-ide-test 0x0000000000b6b03f swift::ModuleDecl::walk(swift::ASTWalker&) + 79 31 swift-ide-test 0x0000000000b451a2 swift::DeclContext::walkContext(swift::ASTWalker&) + 146 32 swift-ide-test 0x000000000085cd1a swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 138 33 swift-ide-test 0x000000000076bb24 swift::CompilerInstance::performSema() + 3316 34 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 declaration 0x5d810b0 at <INPUT-FILE>:3:1 ```
1 parent c7fe4c3 commit ec90c5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
2+
// REQUIRES: asserts
3+
{func a<H
4+
enum b{func a<e{return#^A^#

0 commit comments

Comments
 (0)