Skip to content

[SourceKit] Add test case for crash triggered in swift::getTypeOfCompletionContextExpr(…) #5272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2016
Merged

[SourceKit] Add test case for crash triggered in swift::getTypeOfCompletionContextExpr(…) #5272

merged 1 commit into from
Oct 13, 2016

Conversation

practicalswift
Copy link
Contributor

Stack trace:

found code completion token A at offset 138
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckConstraints.cpp:1636: Optional<swift::Type> swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr *&, swift::DeclContext *, swift::ConcreteDeclRef &, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener *): Assertion `exprType && !exprType->hasError() && "erroneous solution?"' failed.
9  swift-ide-test  0x0000000000a4ed43 swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::CompletionTypeCheckKind, swift::Expr*&, swift::ConcreteDeclRef&) + 691
11 swift-ide-test  0x0000000000988f11 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 305
12 swift-ide-test  0x0000000000838cb1 swift::CompilerInstance::performSema() + 3697
13 swift-ide-test  0x00000000007d9494 main + 42580
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>:3:12 - line:3:12] RangeText="d"

…letionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::CompletionTypeCheckKind, swift::Expr*&, swift::ConcreteDeclRef&)

Stack trace:

```
found code completion token A at offset 138
swift-ide-test: /path/to/swift/lib/Sema/TypeCheckConstraints.cpp:1636: Optional<swift::Type> swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr *&, swift::DeclContext *, swift::ConcreteDeclRef &, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener *): Assertion `exprType && !exprType->hasError() && "erroneous solution?"' failed.
9  swift-ide-test  0x0000000000a4ed43 swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::CompletionTypeCheckKind, swift::Expr*&, swift::ConcreteDeclRef&) + 691
11 swift-ide-test  0x0000000000988f11 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 305
12 swift-ide-test  0x0000000000838cb1 swift::CompilerInstance::performSema() + 3697
13 swift-ide-test  0x00000000007d9494 main + 42580
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>:3:12 - line:3:12] RangeText="d"
```
@practicalswift
Copy link
Contributor Author

@swift-ci please smoke test and merge

@practicalswift
Copy link
Contributor Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 5ba5f01 into swiftlang:master Oct 13, 2016
MaxDesiatov pushed a commit that referenced this pull request Sep 7, 2023
[pull] swiftwasm from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants