Skip to content

Commit 272638a

Browse files
committed
[test] Add some more known crashers
1 parent c717e42 commit 272638a

7 files changed

+52
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"186a3233","signature":"swift::ReferenceStorageType::get(swift::Type, swift::ReferenceOwnership, swift::ASTContext const&)","signatureAssert":"Assertion failed: (!T->hasTypeVariable()), function get"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
struct a<b{ c: b weak var d = \ c {
4+
a()#^^#
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// {"kind":"complete","original":"ee63e244","signature":"swift::rewriting::RequirementMachine::getReducedTypeParameter(swift::CanType, llvm::ArrayRef<swift::GenericTypeParamType*>) 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+
struct c: a {
6+
#^^#
7+
}
8+
d(b )
9+
#e {
10+
d
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"typecheck","original":"bc1e9cdf","signature":"(anonymous namespace)::AssociatedTypeInference::solve()","signatureAssert":"Assertion failed: (!hasTypeParameter() && \"already have an interface type\"), function mapTypeOutOfEnvironment"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed
5+
distributed actor Distributed<DefaultDistributedActorSystem> {
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"typecheck","original":"7048f9d7","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+
{
4+
convenience #a(\array)
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// {"kind":"emit-sil","original":"96451f18","signature":"(anonymous namespace)::LifetimeChecker::getLivenessAtInst(swift::SILInstruction*, unsigned int, unsigned int)","signatureAssert":"Assertion failed: (E <= size() && \"Attempted to set out-of-bounds range!\"), function set"}
2+
// RUN: not --crash %target-swift-frontend -emit-sil %s
3+
struct a<b> {
4+
let c: String
5+
let d: b
6+
}
7+
extension a where b == Void {
8+
init() {
9+
d <= ()
10+
}
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// {"kind":"typecheck","original":"30ab265f","signature":"formatDiagnosticArgument(llvm::StringRef, llvm::StringRef, llvm::ArrayRef<swift::DiagnosticArgument>, unsigned int, swift::DiagnosticFormatOptions, llvm::raw_ostream&)","signatureAssert":"Assertion failed: ((!ModifierArguments.empty() || foundPipe) && \"Index beyond bounds in %select modifier\"), function formatSelectionArgument"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
// REQUIRES: objc_interop
5+
import Foundation
6+
@objc protocol a {
7+
optional var name: String
8+
}
9+
extension NSObject: a {
10+
var names = <#expression#>
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"typecheck","original":"6e824970","signature":"matchCallArguments(swift::constraints::ConstraintSystem&, swift::FunctionType*, swift::ArgumentList*, llvm::ArrayRef<swift::AnyFunctionType::Param>, llvm::ArrayRef<swift::AnyFunctionType::Param>, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, std::__1::optional<swift::constraints::TrailingClosureMatching>, llvm::SmallVectorImpl<std::__1::pair<swift::TypeVariableType*, swift::ExistentialArchetypeType*>>&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
$1
5+
}($a: [])

0 commit comments

Comments
 (0)