Skip to content

Commit 2738d22

Browse files
authored
Merge pull request #83368 from hamishknight/fuzzy
[test] Add some more known crashers
2 parents 597aaba + ae0f9f5 commit 2738d22

16 files changed

+82
-7
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"complete","original":"61e9155a","signature":"swift::ide::ContextFreeCodeCompletionResult::getCodeCompletionDeclKind(swift::Decl const*)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
extension ()
4+
where
5+
#^^# == <#type#>
6+
{
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","original":"7bbb1dc5","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+
a ? {
4+
init { b { extension
5+
}#^^#
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","original":"588b7eea","signature":"swift::BoundGenericType::get(swift::NominalTypeDecl*, swift::Type, llvm::ArrayRef<swift::Type>)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
// REQUIRES: OS=macosx
4+
import Foundation
5+
Foundation[
6+
#^^#]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"bae855bf","signature":"swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose<swift::Identifier, swift::NominalTypeDecl const*>(swift::Decl const*, swift::Diag<swift::Identifier, swift::NominalTypeDecl const*>, swift::detail::PassArgument<swift::Identifier>::type, swift::detail::PassArgument<swift::NominalTypeDecl const*>::type)"}
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: c, b extension a where b #^^#
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"kind":"complete","original":"ea806f48","signature":"swift::Type::transformRec(llvm::function_ref<std::__1::optional<swift::Type> (swift::TypeBase*)>) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@dynamicMemberLookup
4+
struct a<b{
5+
c: () -> b^subscript<d>(dynamicMember e: WritableKeyPath<b, d>) a<d> }
6+
let binding = a
7+
{ buffer #^^#??
8+
binding.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","original":"f8c1c082","signature":"swift::ide::PostfixCompletionCallback::Result::tryMerge(swift::ide::PostfixCompletionCallback::Result const&, swift::DeclContext*)"}
2+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
typealias a = () arr = [a].append([
4+
0])#^^#
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","original":"3de07705","signature":"swift::ide::PostfixCompletionCallback::Result::tryMerge(swift::ide::PostfixCompletionCallback::Result const&, swift::DeclContext*)"}
2+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
2 ?? .map {} #^^#?? a

validation-test/compiler_crashers_2/12d47ccfc65a990.swift

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// {"kind":"emit-silgen","original":"e8914023","signature":"swift::Lowering::AbstractionPattern::getNumFunctionParams() const"}
2+
// RUN: not --crash %target-swift-frontend -emit-silgen %s
3+
func a<b, each c>(
4+
_: (repeat each c)!,
5+
_: b
6+
) {
7+
}
8+
struct d {
9+
let e = ""
10+
static func == (g: Self, f: Self) {
11+
let h =
12+
\.e as (Self) -> _
13+
a(h, f)
14+
}
15+
}

validation-test/compiler_crashers_2/361c5acf488944d1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// {"signature":"swift::InFlightSubstitution::lookupConformance(swift::Type, swift::ProtocolDecl*, unsigned int)"}
1+
// {"kind":"typecheck","signature":"swift::InFlightSubstitution::checkLimits(swift::Type)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
typealias a<b, c, d> = () struct e < each b {
44
typealias f<each c, d> = (repeat a<each b, each c, d>)struct g < each c {

0 commit comments

Comments
 (0)