Skip to content

Commit 86f8e22

Browse files
committed
[test] Add some more known crashers
1 parent 4cc9ea5 commit 86f8e22

7 files changed

+29
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"00fc7609","signature":"(anonymous namespace)::CodeCompletionCallbacksImpl::typecheckParsedType()","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
protocol a:Self#^^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"0435fa64","signature":"swift::ide::CompletionLookup::foundDecl(swift::ValueDecl*, swift::DeclVisibilityKind, swift::DynamicLookupInfo)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
extension Sequence where a == <#type#>[ {
4+
#^^#
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"bcb7c8c1","signature":"(anonymous namespace)::ConstraintGenerator::visitTapExpr(swift::TapExpr*)","signatureAssert":"Assertion failed: ((varDC == CS.DC || isa<AbstractClosureExpr>(varDC) || varDC->isChildContextOf(CS.DC)) && \"TapExpr var should be in the same DeclContext we're checking it in!\"), function visitTapExpr"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
func a -> @b("\()." #^^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"d73870ca","signature":"swift::TypeResolution::resolveContextualType(swift::TypeRepr*, swift::DeclContext*, swift::GenericSignature, swift::TypeResolutionOptions, llvm::function_ref<swift::Type (swift::UnboundGenericType*)>, llvm::function_ref<swift::Type (swift::ASTContext&, swift::PlaceholderTypeRepr*)>, llvm::function_ref<swift::Type (swift::Type, swift::PackElementTypeRepr*)>, llvm::function_ref<void (swift::GenericTypeDecl*, llvm::function_ref<swift::Type (swift::SubstitutableType*)>)>, swift::SILTypeResolutionContext*)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@ a(b
4+
#^^# struct c<b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"typecheck","original":"1d97bdbd","signature":"swift::constraints::ConstraintGraph::computeConnectedComponents(llvm::ArrayRef<swift::TypeVariableType*>)","signatureAssert":"Assertion failed: (component != components.end()), function operator()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
let i =... a { " ? \(i Array* )" [
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"typecheck","original":"ee11d1cb","signature":"(anonymous namespace)::ExprRewriter::visitPackExpansionExpr(swift::PackExpansionExpr*)","signatureAssert":"Assertion failed: (environment), function visitPackExpansionExpr"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
repeat [each $0]
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"typecheck","signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const","signatureAssert":"Assertion failed: (Val && \"isa<> used on a null pointer\"), function doit"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a {
4+
callAsFunction( ())
5+
{
6+
a {

0 commit comments

Comments
 (0)