Skip to content

Commit 41acdeb

Browse files
authored
Merge pull request #85150 from hamishknight/fuzzy
[test] Add some more known crashers
2 parents b47ab91 + 88091da commit 41acdeb

7 files changed

+37
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// {"kind":"complete","original":"2201e4ed","signature":"swift::Mangle::ASTMangler::mangleDeclAsUSR(swift::ValueDecl const*, llvm::StringRef)"}
1+
// {"kind":"complete","original":"2201e4ed","signature":"swift::Mangle::ASTMangler::mangleDeclWithPrefix(swift::ValueDecl const*, llvm::StringRef)"}
22
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
33
enum a<b{ protocol c{ class d{ class f<b let e=f #^^#
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"complete","original":"f53cb65c","signature":"(anonymous namespace)::SetLocalDiscriminators::setLocalDiscriminator(swift::ValueDecl*)","signatureAssert":"Assertion failed: (LocalDiscriminator == InvalidDiscriminator && \"LocalDiscriminator is set multiple times\"), function setLocalDiscriminator"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
{ $a in
4+
{
5+
enum b {
6+
c -> b {
7+
#^^#
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","original":"dbc89b63","signature":"swift::Mangle::ASTMangler::appendDeclName(swift::ValueDecl const*, swift::DeclBaseName, bool)","signatureAssert":"Assertion failed: (!getABIDecl(decl) && \"caller should make sure we get ABI decls\"), function appendDeclName"}
2+
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@abi(func a()) struct b {
4+
@#^^#< #declaration
5+
# >
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"typecheck","original":"2e9096bf","signature":"swift::constraints::ConstraintSystem::compareSolutions(swift::constraints::ConstraintSystem&, llvm::ArrayRef<swift::constraints::Solution>, swift::constraints::SolutionDiff const&, unsigned int, unsigned int)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
extension Sequence {
4+
b<c, d: KeyPath<Element, c>>(d )
5+
{
6+
[(a:2), (0.0 a : 1)].b(\.a
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"typecheck","original":"1806b993","signature":"swift::constraints::ConstraintSystem::diagnoseAmbiguityWithFixes(llvm::SmallVectorImpl<swift::constraints::Solution>&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<each b >(repeat inout each b) -> (repeat each b
4+
( ;
5+
let c 0 = a( 12.3 + 3
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"typecheck","original":"46f686fe","signature":"swift::ValueDecl::copyFormalAccessFrom(swift::ValueDecl const*, bool)","signatureAssert":"Assertion failed: (!hasAccess() && \"access already set\"), function setAccess"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed
5+
distributed open actor a {
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"typecheck","signature":"expandMacroDefinition(swift::ExpandedMacroDefinition, swift::MacroDecl*, swift::SubstitutionMap, swift::ArgumentList*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@expression macro a()
4+
@expression macro b<c, d>() =
5+
#a<c, d>()
6+
#b<String, Int>

0 commit comments

Comments
 (0)