Commits

practicalswift committed 0af908706ce
[SourceKit] Add test case for crash triggered in swift::Expr::walk(swift::ASTWalker&) Stack trace: ``` found code completion token A at offset 122 swift-ide-test: /path/to/llvm/include/llvm/ADT/PointerUnion.h:297: T llvm::PointerUnion3<swift::Expr *, swift::Stmt *, swift::Decl *>::get() const [PT1 = swift::Expr *, PT2 = swift::Stmt *, PT3 = swift::Decl *, T = swift::Stmt *]: Assertion `is<T>() && "Invalid accessor called"' failed. 14 swift-ide-test 0x0000000000ae636e swift::Expr::walk(swift::ASTWalker&) + 46 15 swift-ide-test 0x00000000009b9af6 swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 502 16 swift-ide-test 0x000000000091ebdb swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*) + 683 18 swift-ide-test 0x0000000000981de6 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134 19 swift-ide-test 0x000000000090907d swift::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 1117 23 swift-ide-test 0x0000000000865a46 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 230 24 swift-ide-test 0x0000000000774304 swift::CompilerInstance::performSema() + 3316 25 swift-ide-test 0x000000000071cc33 main + 35011 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>:2:1 - line:3:14] RangeText="[{} ({[{struct A{" ```