[test] Add some more known crashers

This commit is contained in:
Hamish Knight
2025-09-01 09:28:55 +01:00
parent 19b16a5b6d
commit 1f0d22807c
12 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
// {"kind":"complete","original":"6bce2476","signature":"swift::ide::PostfixCompletionCallback::sawSolutionImpl(swift::constraints::Solution const&)","signatureAssert":"Assertion failed: (BaseIsStaticMetaType == Other.BaseIsStaticMetaType), function tryMerge"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
extension BinaryInteger {
a { .Iterator.Element#^^# ==
self

View File

@@ -0,0 +1,4 @@
// {"kind":"complete","original":"eb071a3e","signature":"swift::constraints::ConstraintSystem::isArgumentGenericFunction(swift::Type, swift::Expr*)","signatureAssert":"Assertion failed: (!getFixedType(tyvar)), function getUnboundBindOverloadDisjunction"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
func a() -> Sequence
a() + #^^#&

View File

@@ -0,0 +1,5 @@
// {"kind":"complete","original":"5d283fee","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
@abi(
extension { #^^#<#declaration#>)
<#declaration#>

View File

@@ -0,0 +1,5 @@
// {"kind":"complete","original":"b353d673","signature":"swift::ide::ArgumentTypeCheckCompletionCallback::sawSolutionImpl(swift::constraints::Solution const&)","signatureAssert":"Assertion failed: (false && \"bad parent call match?\"), function sawSolutionImpl"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
{
b ? \.a (#^^#
}(

View File

@@ -1,3 +1,4 @@
// {"kind":"emit-silgen","signature":"swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef)"}
// RUN: not --crash %target-swift-frontend -emit-ir %s
// rdar://problem/65571199
// UNSUPPORTED: asan

View File

@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"454af16a","signature":"swift::Mangle::ASTMangler::appendClosureComponents(swift::CanType, unsigned int, bool, swift::DeclContext const*, llvm::ArrayRef<swift::GenericEnvironment*>)","stackOverflow":true}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol P {
}
{
return a
func a() -> some P
}

View File

@@ -0,0 +1,5 @@
// {"kind":"typecheck","original":"3a7e17d4","signature":"swift::TypeBase::computeInvertibleConformances()","signatureAssert":"Assertion failed: (!canType->hasUnboundGenericType()), function computeInvertibleConformances"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a<b
extension a
...

View File

@@ -0,0 +1,7 @@
// {"kind":"typecheck","original":"0f52c8c0","signature":"swift::constraints::ConstraintSystem::simplifyExplicitGenericArgumentsConstraint(swift::Type, swift::Type, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (found != openedOverloadTypes.end()), function simplifyExplicitGenericArgumentsConstraint"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a {
struct b
struct b< a {
struct c<d {
e = b< f>.c< >

View File

@@ -0,0 +1,3 @@
// {"kind":"typecheck","original":"6bb0b020","signature":"swift::KeyPathExpr::getKeyPathType() const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{ let a = \ .b { c} (let c = a

View File

@@ -0,0 +1,9 @@
// {"kind":"typecheck","original":"1562769e","signature":"(anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
enum c
func d() e {
if let
f = c
{
switch f {
case let a(b) where b

View File

@@ -0,0 +1,6 @@
// {"kind":"typecheck","original":"00d07d13","signature":"swift::constraints::ConstraintSystem::simplifySameShapeConstraint(swift::Type, swift::Type, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a<each b {
c(repeat each b)
{
for in c(

View File

@@ -0,0 +1,6 @@
// {"kind":"typecheck","original":"b10f3bb6","signature":"swift::Mangle::ASTMangler::appendAnyGenericType(swift::GenericTypeDecl const*, swift::Mangle::ASTMangler::BaseEntitySignature&)","stackOverflow":true}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a
extension a where Self == b? {
enum b
let c: some a