From b7d26fdfde8285a9e868a71fcadc2414f101cc43 Mon Sep 17 00:00:00 2001 From: Hamish Knight Date: Thu, 29 May 2025 14:38:53 +0100 Subject: [PATCH] [test] Add some known type-checker + parser crashers --- .../compiler_crashers_2/109d1c5355f6eab4.swift | 7 +++++++ .../compiler_crashers_2/1470917329979c9a.swift | 7 +++++++ .../compiler_crashers_2/14b6ac8674b84f44.swift | 4 ++++ validation-test/compiler_crashers_2/15659ed9344beff.swift | 4 ++++ validation-test/compiler_crashers_2/181de8a256df48e.swift | 4 ++++ validation-test/compiler_crashers_2/2a41be58398eb21.swift | 4 ++++ .../compiler_crashers_2/3077f0fa215b2f94.swift | 5 +++++ .../compiler_crashers_2/3badfb288fdf42f4.swift | 4 ++++ validation-test/compiler_crashers_2/43bf2cb496111e.swift | 3 +++ .../compiler_crashers_2/4414db6acd8120aa.swift | 3 +++ validation-test/compiler_crashers_2/448bdb8b9df6dd2.swift | 3 +++ validation-test/compiler_crashers_2/457eda8bf9011b6.swift | 4 ++++ .../compiler_crashers_2/462ee2aa7dc23cf3.swift | 7 +++++++ validation-test/compiler_crashers_2/4c7611b7d95a1fb.swift | 3 +++ .../compiler_crashers_2/59b42964e169b6fa.swift | 8 ++++++++ .../compiler_crashers_2/5ac7591881325acd.swift | 5 +++++ .../compiler_crashers_2/5ca07be48f3dc630.swift | 3 +++ validation-test/compiler_crashers_2/5ce9cd9830dc12a.swift | 3 +++ .../compiler_crashers_2/698f276cef6d3418.swift | 4 ++++ .../compiler_crashers_2/7315b4568a81e97d.swift | 4 ++++ .../compiler_crashers_2/756ba8587e7eb26b.swift | 6 ++++++ validation-test/compiler_crashers_2/78a5afee5d5b95.swift | 3 +++ .../compiler_crashers_2/807f13dbbc4a604f.swift | 4 ++++ .../compiler_crashers_2/9f30635127b9f25f.swift | 7 +++++++ .../compiler_crashers_2/a7ee60c01ddf9624.swift | 6 ++++++ .../compiler_crashers_2/aea9b13219906649.swift | 5 +++++ .../compiler_crashers_2/c25aed95f6f6d937.swift | 7 +++++++ .../compiler_crashers_2/c9ec50236e69e012.swift | 5 +++++ validation-test/compiler_crashers_2/ccbe6b312cbec2.swift | 4 ++++ .../compiler_crashers_2/d03a7ba9ca6274b0.swift | 3 +++ validation-test/compiler_crashers_2/d885506018b583.swift | 3 +++ .../compiler_crashers_2/f1419d3f3c2fe6b9.swift | 4 ++++ .../compiler_crashers_2/f6e25531c0e51b62.swift | 5 +++++ .../compiler_crashers_2/f9e59e692b1a6124.swift | 3 +++ .../compiler_crashers_2/fec3d092ae822aa6.swift | 3 +++ validation-test/compiler_crashers_2/issue-81834.swift | 8 ++++++++ 36 files changed, 165 insertions(+) create mode 100644 validation-test/compiler_crashers_2/109d1c5355f6eab4.swift create mode 100644 validation-test/compiler_crashers_2/1470917329979c9a.swift create mode 100644 validation-test/compiler_crashers_2/14b6ac8674b84f44.swift create mode 100644 validation-test/compiler_crashers_2/15659ed9344beff.swift create mode 100644 validation-test/compiler_crashers_2/181de8a256df48e.swift create mode 100644 validation-test/compiler_crashers_2/2a41be58398eb21.swift create mode 100644 validation-test/compiler_crashers_2/3077f0fa215b2f94.swift create mode 100644 validation-test/compiler_crashers_2/3badfb288fdf42f4.swift create mode 100644 validation-test/compiler_crashers_2/43bf2cb496111e.swift create mode 100644 validation-test/compiler_crashers_2/4414db6acd8120aa.swift create mode 100644 validation-test/compiler_crashers_2/448bdb8b9df6dd2.swift create mode 100644 validation-test/compiler_crashers_2/457eda8bf9011b6.swift create mode 100644 validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift create mode 100644 validation-test/compiler_crashers_2/4c7611b7d95a1fb.swift create mode 100644 validation-test/compiler_crashers_2/59b42964e169b6fa.swift create mode 100644 validation-test/compiler_crashers_2/5ac7591881325acd.swift create mode 100644 validation-test/compiler_crashers_2/5ca07be48f3dc630.swift create mode 100644 validation-test/compiler_crashers_2/5ce9cd9830dc12a.swift create mode 100644 validation-test/compiler_crashers_2/698f276cef6d3418.swift create mode 100644 validation-test/compiler_crashers_2/7315b4568a81e97d.swift create mode 100644 validation-test/compiler_crashers_2/756ba8587e7eb26b.swift create mode 100644 validation-test/compiler_crashers_2/78a5afee5d5b95.swift create mode 100644 validation-test/compiler_crashers_2/807f13dbbc4a604f.swift create mode 100644 validation-test/compiler_crashers_2/9f30635127b9f25f.swift create mode 100644 validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift create mode 100644 validation-test/compiler_crashers_2/aea9b13219906649.swift create mode 100644 validation-test/compiler_crashers_2/c25aed95f6f6d937.swift create mode 100644 validation-test/compiler_crashers_2/c9ec50236e69e012.swift create mode 100644 validation-test/compiler_crashers_2/ccbe6b312cbec2.swift create mode 100644 validation-test/compiler_crashers_2/d03a7ba9ca6274b0.swift create mode 100644 validation-test/compiler_crashers_2/d885506018b583.swift create mode 100644 validation-test/compiler_crashers_2/f1419d3f3c2fe6b9.swift create mode 100644 validation-test/compiler_crashers_2/f6e25531c0e51b62.swift create mode 100644 validation-test/compiler_crashers_2/f9e59e692b1a6124.swift create mode 100644 validation-test/compiler_crashers_2/fec3d092ae822aa6.swift create mode 100644 validation-test/compiler_crashers_2/issue-81834.swift diff --git a/validation-test/compiler_crashers_2/109d1c5355f6eab4.swift b/validation-test/compiler_crashers_2/109d1c5355f6eab4.swift new file mode 100644 index 0000000000000..1f2cc495f6d21 --- /dev/null +++ b/validation-test/compiler_crashers_2/109d1c5355f6eab4.swift @@ -0,0 +1,7 @@ +// {"signature":"swift::rewriting::RewriteContext::finishComputingRequirementSignatures(swift::ProtocolDecl const*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a : b where c == d protocol f : g protocol g { + associatedtype 2 : a +} +struct d < e extension d + : f protocol h{associatedtype e associatedtype c : g} protocol b : h diff --git a/validation-test/compiler_crashers_2/1470917329979c9a.swift b/validation-test/compiler_crashers_2/1470917329979c9a.swift new file mode 100644 index 0000000000000..8a98f89ef6258 --- /dev/null +++ b/validation-test/compiler_crashers_2/1470917329979c9a.swift @@ -0,0 +1,7 @@ +// {"signature":"swift::PackExpansionType::PackExpansionType(swift::Type, swift::Type, swift::RecursiveTypeProperties, swift::ASTContext const*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +struct a < each b { + struct c { + d : (repeat(each b + func e { + c(&0 diff --git a/validation-test/compiler_crashers_2/14b6ac8674b84f44.swift b/validation-test/compiler_crashers_2/14b6ac8674b84f44.swift new file mode 100644 index 0000000000000..24b8bad880983 --- /dev/null +++ b/validation-test/compiler_crashers_2/14b6ac8674b84f44.swift @@ -0,0 +1,4 @@ +// {"signature":"(anonymous namespace)::ABIDependencyEvaluator::computeABIDependenciesForModule(swift::ModuleDecl*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +switch { +case init diff --git a/validation-test/compiler_crashers_2/15659ed9344beff.swift b/validation-test/compiler_crashers_2/15659ed9344beff.swift new file mode 100644 index 0000000000000..6e7b6e7c2378c --- /dev/null +++ b/validation-test/compiler_crashers_2/15659ed9344beff.swift @@ -0,0 +1,4 @@ +// {"signature":"getTypeForSymbolRange(swift::rewriting::Symbol const*, swift::rewriting::Symbol const*, llvm::ArrayRef, swift::rewriting::PropertyMap const&)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +// REQUIRES: OS=macosx +import Combine extension Publishers.Share{a {func a , c.Output == diff --git a/validation-test/compiler_crashers_2/181de8a256df48e.swift b/validation-test/compiler_crashers_2/181de8a256df48e.swift new file mode 100644 index 0000000000000..b1635a257d88a --- /dev/null +++ b/validation-test/compiler_crashers_2/181de8a256df48e.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::rewriting::RequirementMachine::verify(swift::rewriting::MutableTerm const&) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a { + typealias Index extension Collection where Self : a{b : Index} protocol a diff --git a/validation-test/compiler_crashers_2/2a41be58398eb21.swift b/validation-test/compiler_crashers_2/2a41be58398eb21.swift new file mode 100644 index 0000000000000..24b045df5599d --- /dev/null +++ b/validation-test/compiler_crashers_2/2a41be58398eb21.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::DeclContext::getASTContext() const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +@a({ struct b } + var c diff --git a/validation-test/compiler_crashers_2/3077f0fa215b2f94.swift b/validation-test/compiler_crashers_2/3077f0fa215b2f94.swift new file mode 100644 index 0000000000000..25e9dc3d3435f --- /dev/null +++ b/validation-test/compiler_crashers_2/3077f0fa215b2f94.swift @@ -0,0 +1,5 @@ +// {"signature":"swift::Type llvm::function_ref::callback_fn) const::$_0 const>(long, swift::SubstitutableType*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a extension a { + class b { + struct c < f struct d func e->c diff --git a/validation-test/compiler_crashers_2/3badfb288fdf42f4.swift b/validation-test/compiler_crashers_2/3badfb288fdf42f4.swift new file mode 100644 index 0000000000000..ee3e535b1635a --- /dev/null +++ b/validation-test/compiler_crashers_2/3badfb288fdf42f4.swift @@ -0,0 +1,4 @@ +// {"signature":"(anonymous namespace)::TypeSubstituter::transformDependentMemberType(swift::DependentMemberType*, swift::TypePosition)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +// REQUIRES: OS=macosx +import Combine extension Publishers.Share where Upstream == {a where Upstream == Publishers.FlatMap diff --git a/validation-test/compiler_crashers_2/43bf2cb496111e.swift b/validation-test/compiler_crashers_2/43bf2cb496111e.swift new file mode 100644 index 0000000000000..cdfc24fbd0bfb --- /dev/null +++ b/validation-test/compiler_crashers_2/43bf2cb496111e.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::Lexer::formEscapedIdentifierToken(char const*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +`` diff --git a/validation-test/compiler_crashers_2/4414db6acd8120aa.swift b/validation-test/compiler_crashers_2/4414db6acd8120aa.swift new file mode 100644 index 0000000000000..bd1f31726071d --- /dev/null +++ b/validation-test/compiler_crashers_2/4414db6acd8120aa.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::ast_scope::ASTScopeImpl::printRange(llvm::raw_ostream&) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +func a < >> diff --git a/validation-test/compiler_crashers_2/448bdb8b9df6dd2.swift b/validation-test/compiler_crashers_2/448bdb8b9df6dd2.swift new file mode 100644 index 0000000000000..ca2bcd37ab654 --- /dev/null +++ b/validation-test/compiler_crashers_2/448bdb8b9df6dd2.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::DeclRefTypeRepr::overwriteNameRef(swift::DeclNameRef)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +switch { case init( diff --git a/validation-test/compiler_crashers_2/457eda8bf9011b6.swift b/validation-test/compiler_crashers_2/457eda8bf9011b6.swift new file mode 100644 index 0000000000000..109005f0423c0 --- /dev/null +++ b/validation-test/compiler_crashers_2/457eda8bf9011b6.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::constraints::ConstraintSystem::setCapturedExpansions(swift::AnyFunctionRef, llvm::SmallVector)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +{ + repeat a { diff --git a/validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift b/validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift new file mode 100644 index 0000000000000..e6e0a2c765574 --- /dev/null +++ b/validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift @@ -0,0 +1,7 @@ +// {"signature":"recordTypeWitness(swift::NormalProtocolConformance*, swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a{associatedtype b} protocol c + : a{d(b)} protocol e{associatedtype f} extension e { + protocol g : e, c { associatedtype f : c associatedtype b } + struct h : g { + typealias f = i diff --git a/validation-test/compiler_crashers_2/4c7611b7d95a1fb.swift b/validation-test/compiler_crashers_2/4c7611b7d95a1fb.swift new file mode 100644 index 0000000000000..d7404dcf2dcb3 --- /dev/null +++ b/validation-test/compiler_crashers_2/4c7611b7d95a1fb.swift @@ -0,0 +1,3 @@ +// {"signature":"(anonymous namespace)::ConstraintWalker::walkToExprPost(swift::Expr*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +\.+= diff --git a/validation-test/compiler_crashers_2/59b42964e169b6fa.swift b/validation-test/compiler_crashers_2/59b42964e169b6fa.swift new file mode 100644 index 0000000000000..1fafba98fc4df --- /dev/null +++ b/validation-test/compiler_crashers_2/59b42964e169b6fa.swift @@ -0,0 +1,8 @@ +// {"signature":"swift::ProtocolConformanceRef::getProtocol() const"} +// RUN: not --crash %target-swift-frontend -typecheck %s + func a&)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +extension _UIntBuffer { + a { + struct b : OptionSet diff --git a/validation-test/compiler_crashers_2/5ca07be48f3dc630.swift b/validation-test/compiler_crashers_2/5ca07be48f3dc630.swift new file mode 100644 index 0000000000000..c5c4158eb4ada --- /dev/null +++ b/validation-test/compiler_crashers_2/5ca07be48f3dc630.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::TuplePatternElt& llvm::SmallVectorTemplateBase::growAndEmplaceBack(swift::Identifier&&, swift::SourceLoc&&, swift::Pattern*&)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +switch { case .a(&b diff --git a/validation-test/compiler_crashers_2/5ce9cd9830dc12a.swift b/validation-test/compiler_crashers_2/5ce9cd9830dc12a.swift new file mode 100644 index 0000000000000..548c5ce15d38c --- /dev/null +++ b/validation-test/compiler_crashers_2/5ce9cd9830dc12a.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::DeclAndTypePrinter::Implementation::visitVarDecl(swift::VarDecl*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +#init diff --git a/validation-test/compiler_crashers_2/698f276cef6d3418.swift b/validation-test/compiler_crashers_2/698f276cef6d3418.swift new file mode 100644 index 0000000000000..a849109089a8b --- /dev/null +++ b/validation-test/compiler_crashers_2/698f276cef6d3418.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::DefaultAndMaxAccessLevelRequest::cacheResult(std::__1::pair) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +struct a < b extension a where b : c, d == a { + protocol c struct a diff --git a/validation-test/compiler_crashers_2/7315b4568a81e97d.swift b/validation-test/compiler_crashers_2/7315b4568a81e97d.swift new file mode 100644 index 0000000000000..7c614858de512 --- /dev/null +++ b/validation-test/compiler_crashers_2/7315b4568a81e97d.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::GenericSignature::verify(llvm::ArrayRef) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a { + typealias b where Self : a protocol a diff --git a/validation-test/compiler_crashers_2/756ba8587e7eb26b.swift b/validation-test/compiler_crashers_2/756ba8587e7eb26b.swift new file mode 100644 index 0000000000000..400b75db3b19b --- /dev/null +++ b/validation-test/compiler_crashers_2/756ba8587e7eb26b.swift @@ -0,0 +1,6 @@ +// {"signature":"(anonymous namespace)::Verifier::verifyChecked(swift::Type)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +class a < b { + d { + class e : a struct f subscript(h : e) { + h.d base diff --git a/validation-test/compiler_crashers_2/78a5afee5d5b95.swift b/validation-test/compiler_crashers_2/78a5afee5d5b95.swift new file mode 100644 index 0000000000000..348b91b83b957 --- /dev/null +++ b/validation-test/compiler_crashers_2/78a5afee5d5b95.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::Parser::parseStmtConditionElement(llvm::SmallVectorImpl&, swift::Diag<>, swift::StmtKind, llvm::StringRef&)"} +// RUN: not --crash %target-swift-frontend -typecheck %s + func a: b[ if let diff --git a/validation-test/compiler_crashers_2/807f13dbbc4a604f.swift b/validation-test/compiler_crashers_2/807f13dbbc4a604f.swift new file mode 100644 index 0000000000000..26919df70d816 --- /dev/null +++ b/validation-test/compiler_crashers_2/807f13dbbc4a604f.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::AccessLevelRequest::cacheResult(swift::AccessLevel) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +class a < b extension a where c == d { + protocol d diff --git a/validation-test/compiler_crashers_2/9f30635127b9f25f.swift b/validation-test/compiler_crashers_2/9f30635127b9f25f.swift new file mode 100644 index 0000000000000..7b1a16a1fe0d9 --- /dev/null +++ b/validation-test/compiler_crashers_2/9f30635127b9f25f.swift @@ -0,0 +1,7 @@ +// {"signature":"(anonymous namespace)::PreCheckTarget::walkToExprPre(swift::Expr*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +{ + extension a { + b { + func c { + super diff --git a/validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift b/validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift new file mode 100644 index 0000000000000..e965f864c172f --- /dev/null +++ b/validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift @@ -0,0 +1,6 @@ +// {"signature":"(anonymous namespace)::LookupResultBuilder::add(swift::ValueDecl*, swift::DeclContext*, swift::ValueDecl*, swift::Type, bool)::'lambda'(swift::ValueDecl*)::operator()(swift::ValueDecl*) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a{b} protocol c : a protocol d : c extension d { + struct e : d { + f { + b diff --git a/validation-test/compiler_crashers_2/aea9b13219906649.swift b/validation-test/compiler_crashers_2/aea9b13219906649.swift new file mode 100644 index 0000000000000..5deca465201ff --- /dev/null +++ b/validation-test/compiler_crashers_2/aea9b13219906649.swift @@ -0,0 +1,5 @@ +// {"signature":"checkRequirementsImpl(llvm::ArrayRef, bool)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +struct a < Element { + b { + class c : Collection { typealias Index = d subscript(e : diff --git a/validation-test/compiler_crashers_2/c25aed95f6f6d937.swift b/validation-test/compiler_crashers_2/c25aed95f6f6d937.swift new file mode 100644 index 0000000000000..db9bbd82eac20 --- /dev/null +++ b/validation-test/compiler_crashers_2/c25aed95f6f6d937.swift @@ -0,0 +1,7 @@ +// {"signature":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast, file Casting.h, line 662."} +// RUN: not --crash %target-swift-frontend -typecheck %s +{ + extension { + a { + func b { + super diff --git a/validation-test/compiler_crashers_2/c9ec50236e69e012.swift b/validation-test/compiler_crashers_2/c9ec50236e69e012.swift new file mode 100644 index 0000000000000..ae11ff657f040 --- /dev/null +++ b/validation-test/compiler_crashers_2/c9ec50236e69e012.swift @@ -0,0 +1,5 @@ +// {"signature":"(anonymous namespace)::Verifier::verifyParsed(swift::AbstractClosureExpr*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +func == { + switch { + case.a { diff --git a/validation-test/compiler_crashers_2/ccbe6b312cbec2.swift b/validation-test/compiler_crashers_2/ccbe6b312cbec2.swift new file mode 100644 index 0000000000000..e91101da75ad9 --- /dev/null +++ b/validation-test/compiler_crashers_2/ccbe6b312cbec2.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::constraints::MissingConformanceFailure::diagnoseTypeCannotConform(swift::Type, swift::Type) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a extension a { + b { func * (Self= { diff --git a/validation-test/compiler_crashers_2/d03a7ba9ca6274b0.swift b/validation-test/compiler_crashers_2/d03a7ba9ca6274b0.swift new file mode 100644 index 0000000000000..4edef177fa287 --- /dev/null +++ b/validation-test/compiler_crashers_2/d03a7ba9ca6274b0.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::ParamSpecifierRequest::evaluate(swift::Evaluator&, swift::ParamDecl*) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +func a([0]) diff --git a/validation-test/compiler_crashers_2/d885506018b583.swift b/validation-test/compiler_crashers_2/d885506018b583.swift new file mode 100644 index 0000000000000..e4f0962ec4014 --- /dev/null +++ b/validation-test/compiler_crashers_2/d885506018b583.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::AvailabilityContext::Storage::get(swift::AvailabilityRange const&, bool, llvm::ArrayRef, swift::ASTContext const&)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a extension a where b == Self{c : } typealias b : Sequence diff --git a/validation-test/compiler_crashers_2/f1419d3f3c2fe6b9.swift b/validation-test/compiler_crashers_2/f1419d3f3c2fe6b9.swift new file mode 100644 index 0000000000000..ab31c3ae6c828 --- /dev/null +++ b/validation-test/compiler_crashers_2/f1419d3f3c2fe6b9.swift @@ -0,0 +1,4 @@ +// {"signature":"swift::QueryInterfaceTypeSubstitutions::operator()(swift::SubstitutableType*) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +extension Collection where Self : a { + struct Index protocol a diff --git a/validation-test/compiler_crashers_2/f6e25531c0e51b62.swift b/validation-test/compiler_crashers_2/f6e25531c0e51b62.swift new file mode 100644 index 0000000000000..25bdae0e48872 --- /dev/null +++ b/validation-test/compiler_crashers_2/f6e25531c0e51b62.swift @@ -0,0 +1,5 @@ +// {"signature":"swift::constraints::RequirementFailure::RequirementFailure(swift::constraints::Solution const&, swift::Type, swift::Type, swift::constraints::ConstraintLocator*)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +protocol a{associatedtype b} extension a where b == { + protocol c var d : c { + d diff --git a/validation-test/compiler_crashers_2/f9e59e692b1a6124.swift b/validation-test/compiler_crashers_2/f9e59e692b1a6124.swift new file mode 100644 index 0000000000000..41c28cf10bfcc --- /dev/null +++ b/validation-test/compiler_crashers_2/f9e59e692b1a6124.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const"} +// RUN: not --crash %target-swift-frontend -typecheck %s +func a(d : repeat(b)->each c) { repeat d(e = f diff --git a/validation-test/compiler_crashers_2/fec3d092ae822aa6.swift b/validation-test/compiler_crashers_2/fec3d092ae822aa6.swift new file mode 100644 index 0000000000000..950e4eef006d3 --- /dev/null +++ b/validation-test/compiler_crashers_2/fec3d092ae822aa6.swift @@ -0,0 +1,3 @@ +// {"signature":"swift::Parser::parseExprSequenceElement(swift::Diag<>, bool)"} +// RUN: not --crash %target-swift-frontend -typecheck %s +any a < diff --git a/validation-test/compiler_crashers_2/issue-81834.swift b/validation-test/compiler_crashers_2/issue-81834.swift new file mode 100644 index 0000000000000..ffb6f51411a38 --- /dev/null +++ b/validation-test/compiler_crashers_2/issue-81834.swift @@ -0,0 +1,8 @@ +// RUN: not --crash %target-swift-frontend -typecheck -library-level api %s +// REQUIRES: OS=macosx + +// https://github.com/swiftlang/swift/issues/81834 +public class C { + public subscript() -> Int { + get { + extension C {}