Skip to content

Commit 7768d54

Browse files
authored
Merge pull request #83509 from hamishknight/fuzzy
[test] Add some more known crashers
2 parents 143d8ff + cfa8135 commit 7768d54

19 files changed

+115
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"complete","original":"0116e8cd","signature":"swift::ConformanceChecker::resolveWitnessViaLookup(swift::ValueDecl*)","signatureAssert":"Assertion failed: (Conformance->getWitnessUncached(requirement).getDecl() == match.Witness && \"Deduced different witnesses?\"), function recordWitness"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
struct a: OptionSet {
4+
static rawValue = a init(rawValue: Int ) {
5+
#^^#
6+
}
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"14893775","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*)>, swift::SILTypeResolutionContext*)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoContext"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@a(
4+
#^^#) func b<a>()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"1615843d","signature":"(anonymous namespace)::TypePrinter::printParentType(swift::Type)","signatureAssert":"Assertion failed: (!hasTypeParameter() && \"already have an interface type\"), function mapTypeOutOfContext"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
class a<b class c<b , e : a<b>> { class d let builder = d#^^#
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"kind":"complete","original":"029049d6","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 mapTypeIntoContext"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
struct c<d {
4+
var : {
5+
protocol a {
6+
struct e {
7+
b {
8+
#^^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"773d9dd1","signature":"swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::SubstOptions) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@_marker protocol a {
4+
b:
5+
#^^# typealias 5
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"4be98c4c","signature":"swift::Parser::consumeDecl(swift::ParserPosition, bool)","signatureAssert":"Assertion failed: (!IDEInspectionDelayedDeclStat.get() && \"only one decl can be delayed for code completion\"), function setIDEInspectionDelayedDeclState"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
case /if { class a{ #^^#<#expression#>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"1bd67425","signature":"swift::diagnoseMissingOwnership(swift::ParamSpecifier, swift::TypeRepr*, swift::Type, swift::TypeResolution const&)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoContext"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@a(0#^^#-> b->func > <b
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"complete","original":"831da109","signature":"void llvm::function_ref<void (swift::VarDecl*)>::callback_fn<swift::ast_scope::ASTScopeImpl::lookupLocalBindingsInPattern(swift::Pattern const*, swift::namelookup::AbstractASTScopeDeclConsumer&)::$_0>(long, swift::VarDecl*)","signatureAssert":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
{
4+
@abi(func & ()) var a {
5+
#^^#
6+
}
7+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// {"kind":"complete","original":"ac690622","signature":"swift::rewriting::RequirementMachine::requiresClass(swift::Type) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
protocol a {
4+
associatedtype b
5+
func c -> b
6+
struct d<e: Collection, f
7+
>: a
8+
where e.Element ==
9+
{
10+
c -> some a {
11+
self#^^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"1433c7e3","signature":"swift::ide::KeyPathTypeCheckCompletionCallback::sawSolutionImpl(swift::constraints::Solution const&)","signatureAssert":"Assertion failed: (ComponentIndex < KeyPath->getComponents().size() && \"Didn't find a code compleiton component?\"), function sawSolutionImpl"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
{ \a#^^# ? }
4+
<

0 commit comments

Comments
 (0)