Skip to content

Commit ba715db

Browse files
authored
Merge pull request swiftlang#82103 from hamishknight/fuzzy
[test] Add a few more known type-checker crashers
2 parents 7d45453 + 92a5c00 commit ba715db

File tree

83 files changed

+211
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+211
-30
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::FunctionTypeMismatch::FunctionTypeMismatch(swift::constraints::Solution const&, swift::ContextualTypePurpose, swift::Type, swift::Type, llvm::ArrayRef<unsigned int>, swift::constraints::ConstraintLocator*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a< each b >->(Int, repeat each b)Float= a(
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ExtensionDecl::getExtendedNominal() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
extension a {}
4+
func b < >>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::rewriting::RequirementMachine::verify(swift::rewriting::MutableTerm const&) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
protocol a {
54
typealias Index extension Collection where Self : a{b : Index} protocol a
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::SolverTrail::~SolverTrail()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
enum a< b { case c(}
4+
func d< b >(b->a< b >) d(a< e >.c let a

validation-test/compiler_crashers_2/1be7dd4882cd8c39.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"swift::RootProtocolConformance::getWitness(swift::ValueDecl*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
protocol a{typealias b : IteratorProtocol} extension a{typealias Element =
54
b.Element} protocol c
65
: a{typealias b typealias Element} protocol d
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::rewriting::PropertyMap::addSuperclassProperty(swift::rewriting::Term, swift::rewriting::Symbol, unsigned int)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a < b class c : a func d < b where b : a<Int>, b : c
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"lookupReplacedDecl(swift::DeclNameRef, swift::DeclAttribute const*, swift::ValueDecl const*, llvm::SmallVectorImpl<swift::ValueDecl*>&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{ @_dynamicReplacement(for: ) func a
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"(anonymous namespace)::ExprWalker::walkToExprPost(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a {
4+
{
5+
\ b() a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::setClosureType(swift::ClosureExpr const*, swift::FunctionType*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol b let c = {(a : b)in switch a{case.d {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"signature":"swift::InFlightSubstitution::lookupConformance(swift::Type, swift::ProtocolDecl*, unsigned int)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a<b, c, d> = () struct e < each b {
4+
typealias f<each c, d> = (repeat a<each b, each c, d>)struct g < each c {
5+
typealias h< each d > = (repeat f< repeat each c, each d >
6+
struct i typealias j< each d > =
7+
e< i >.g< repeat each b >.h< repeat each d >

0 commit comments

Comments
 (0)