Skip to content

Commit a8be69f

Browse files
committed
[test] Add some more known crashers
1 parent 109383a commit a8be69f

File tree

12 files changed

+84
-0
lines changed

12 files changed

+84
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"kind":"complete","signature":"(anonymous namespace)::getEquivalentDeclContextFromSourceFile(swift::DeclContext*, swift::SourceFile*)","useSourceOrderCompletion":true}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-order-completion -source-filename %s
3+
// https://github.com/swiftlang/swift/issues/84785
4+
func 0 {
5+
#^^#
6+
}
7+
do { func a {
8+
#^b^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"b8da5db5","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+
extension Slice {
4+
a {
5+
#^^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"afd4a708","signature":"swift::ClangUSRGenerationRequest::evaluate(swift::Evaluator&, swift::ValueDecl const*) const","signatureAssert":"Assertion failed: (ObjCName.second), function printObjCUSR"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
// REQUIRES: objc_interop
4+
@objc(: @ protocol a
5+
.#^^#
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// {"kind":"complete","original":"dbc80c20","signature":"swift::AbstractStorageDecl::setSynthesizedAccessor(swift::AccessorKind, swift::AccessorDecl*)"}
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 c: a
5+
var b: c
6+
}
7+
protocol d: a where c == Never
8+
extension Never: d
9+
extension d { b: Never = #^^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"54d9bed5","signature":"swift::ClangUSRGenerationRequest::evaluate(swift::Evaluator&, swift::ValueDecl const*) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@ c struct a >
4+
#^^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"afd4a708","signature":"swift::objc_translation::getNameForObjC(swift::ValueDecl const*, swift::objc_translation::CustomNamesOnly_t)","signatureAssert":"Assertion failed: (name->getNumSelectorPieces() == 1), function getNameForObjC"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
// REQUIRES: objc_interop
4+
@objc(:a @ protocol b
5+
.#^^#
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// {"kind":"emit-silgen","original":"caeb568b","signature":"swift::CanTypeWrapperTraits<swift::SILFunctionType>::type swift::SILType::castTo<swift::SILFunctionType>() const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
2+
// RUN: not --crash %target-swift-frontend -emit-silgen %s
3+
func a<b, each c>(d
4+
: repeat Optional<each c>, body
5+
: (repeat UnsafePointer<each c>) -> b) {
6+
body(repeat {
7+
each d
8+
})
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// {"kind":"typecheck","original":"25bd9966","signature":"swift::rewriting::RequirementMachine::lookupNestedType(swift::Type, swift::Identifier) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a {
4+
associatedtype b: Error
5+
}
6+
extension a {
7+
protocol c {
8+
#d( == e
9+
}
10+
class Error where b: c, b.d:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"typecheck","original":"4f0b1241","signature":"swift::Type llvm::function_ref<swift::Type (swift::SubstitutableType*)>::callback_fn<(anonymous namespace)::BuildForwardingSubstitutions>(long, swift::SubstitutableType*)","signatureAssert":"Assertion failed: (rootParameterPacks.size() >= 1), function getSingletonPackExpansion"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a: b
4+
struct b<each c: a { c:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"kind":"typecheck","original":"379a5956","signature":"swift::rewriting::RequirementMachine::isConcreteType(swift::Type, swift::ProtocolDecl const*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a {
4+
associatedtype b: c where b.d == b
5+
protocol c {
6+
associatedtype d: a where d.b == Self
7+
}
8+
}

0 commit comments

Comments
 (0)