Skip to content

Commit 1f0d228

Browse files
committed
[test] Add some more known crashers
1 parent 19b16a5 commit 1f0d228

12 files changed

+64
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"6bce2476","signature":"swift::ide::PostfixCompletionCallback::sawSolutionImpl(swift::constraints::Solution const&)","signatureAssert":"Assertion failed: (BaseIsStaticMetaType == Other.BaseIsStaticMetaType), function tryMerge"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
extension BinaryInteger {
4+
a { .Iterator.Element#^^# ==
5+
self
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"eb071a3e","signature":"swift::constraints::ConstraintSystem::isArgumentGenericFunction(swift::Type, swift::Expr*)","signatureAssert":"Assertion failed: (!getFixedType(tyvar)), function getUnboundBindOverloadDisjunction"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
func a() -> Sequence
4+
a() + #^^#&
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"5d283fee","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@abi(
4+
extension { #^^#<#declaration#>)
5+
<#declaration#>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"b353d673","signature":"swift::ide::ArgumentTypeCheckCompletionCallback::sawSolutionImpl(swift::constraints::Solution const&)","signatureAssert":"Assertion failed: (false && \"bad parent call match?\"), function sawSolutionImpl"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
{
4+
b ? \.a (#^^#
5+
}(

validation-test/compiler_crashers_2/0208-issue-51259.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// {"kind":"emit-silgen","signature":"swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef)"}
12
// RUN: not --crash %target-swift-frontend -emit-ir %s
23
// rdar://problem/65571199
34
// UNSUPPORTED: asan
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"kind":"typecheck","original":"454af16a","signature":"swift::Mangle::ASTMangler::appendClosureComponents(swift::CanType, unsigned int, bool, swift::DeclContext const*, llvm::ArrayRef<swift::GenericEnvironment*>)","stackOverflow":true}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol P {
4+
}
5+
{
6+
return a
7+
func a() -> some P
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"typecheck","original":"3a7e17d4","signature":"swift::TypeBase::computeInvertibleConformances()","signatureAssert":"Assertion failed: (!canType->hasUnboundGenericType()), function computeInvertibleConformances"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a<b
4+
extension a
5+
...
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"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"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a {
4+
struct b
5+
struct b< a {
6+
struct c<d {
7+
e = b< f>.c< >
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"typecheck","original":"6bb0b020","signature":"swift::KeyPathExpr::getKeyPathType() const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{ let a = \ .b { c} (let c = a
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// {"kind":"typecheck","original":"1562769e","signature":"(anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
enum c
4+
func d() e {
5+
if let
6+
f = c
7+
{
8+
switch f {
9+
case let a(b) where b

0 commit comments

Comments
 (0)