Skip to content

Commit ba715db

Browse files
authored
Merge pull request #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 >
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::TypeBase::getOptionalObjectType()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
enum a { b } {
4+
let:
5+
String->a = a.b
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::ast_scope::SpecializeAttributeScope::getSourceRangeOfThisASTNode(bool) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
{
54
@in
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintLocator::isKeyPathMemberComponent() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
\_(error)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"(anonymous namespace)::ConnectedComponents::unionSets(swift::TypeVariableType*, swift::TypeVariableType*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
let b = ( c , d a {
4+
e b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"$s11swiftASTGen19addQueuedDiagnostic20queuedDiagnosticsPtr011perFrontende5StateH04text8severity4cLoc12categoryName17documentationPath015highlightRangesH0012numHighlightT013fixItsUntypedySv_SvSo16BridgedStringRefVSo0zE8SeverityVSo0z6SourceN0VA2NSPySo0Z15CharSourceRangeVGSgSiSo0Z8ArrayRefVtF"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: swift_swift_parser
4+
class a { @objc ( : ( b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"std::__1::optional<swift::Type> llvm::function_ref<std::__1::optional<swift::Type> (swift::TypeBase*)>::callback_fn<swift::constraints::FailureDiagnostic::resolveType(swift::Type, bool, bool) const::$_0>(long, swift::TypeBase*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
Array(repeat a
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::ast_scope::ASTScopeImpl::printRange(llvm::raw_ostream&) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
func a < >>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::Decl::getResolvedCustomAttrType(swift::CustomAttr*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
struct a {
54
@b c, () {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::addFix(swift::constraints::ConstraintFix*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<b>(b) -> b a(["":0]) as [Int:String]
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::constraints::ConstraintSystem::setCapturedExpansions(swift::AnyFunctionRef, llvm::SmallVector<swift::PackExpansionExpr*, 1u>)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
{
54
repeat a {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::constraints::ConstraintSystem::repairFailures(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, llvm::SmallVectorImpl<swift::constraints::RestrictionOrFix>&, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
func a< b , c : Sequence, d >( b, c) where b== c.Element a( ( 0 , [ (0 0), (

validation-test/compiler_crashers_2/462ee2aa7dc23cf3.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"recordTypeWitness(swift::NormalProtocolConformance*, swift::AssociatedTypeDecl*, swift::Type, swift::TypeDecl*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
protocol a{associatedtype b} protocol c
54
: a{d(b)} protocol e{associatedtype f} extension e {
65
protocol g : e, c { associatedtype f : c associatedtype b }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::recordOpenedTypes(swift::constraints::ConstraintLocatorBuilder, llvm::SmallVectorImpl<std::__1::pair<swift::GenericTypeParamType*, swift::TypeVariableType*>>&, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
a<b> class a func a < c class b < d
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::TypeChecker::typeCheckParameterDefault(swift::Expr*&, swift::DeclContext*, swift::Type, bool, bool)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
init<a>(b: a == {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::diagnoseArgumentLabelError(swift::ASTContext&, swift::ArgumentList const*, llvm::ArrayRef<swift::Identifier>, swift::ParameterContext, swift::InFlightDiagnostic*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<b>((), c : ()->b) a {}
4+
c : {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"signature":"swift::DeclAttribute::printImpl(swift::ASTPrinter&, swift::PrintOptions const&, swift::Decl const*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a { associatedtype b }
4+
public
5+
struct c < d : a extension c {
6+
public
7+
typealias e = d.b
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::TuplePatternElt& llvm::SmallVectorTemplateBase<swift::TuplePatternElt, true>::growAndEmplaceBack<swift::Identifier, swift::SourceLoc, swift::Pattern*&>(swift::Identifier&&, swift::SourceLoc&&, swift::Pattern*&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
switch { case .a(&b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::getCalleeLocator(swift::constraints::ConstraintLocator*, bool, llvm::function_ref<swift::Type (swift::Expr*)>, llvm::function_ref<swift::Type (swift::Type)>, llvm::function_ref<std::__1::optional<swift::constraints::SelectedOverload> (swift::constraints::ConstraintLocator*)>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a func b(c : [Int]) {
4+
\ a(c.map{})
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::InFlightSubstitution::substType(swift::SubstitutableType*, unsigned int)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a< each b > = ( < struct c< each d {
4+
typealias e< each b > = (repeat a< each d, each b >
5+
struct f typealias 1 = c .e<>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::PackType::getSingletonPackExpansion(swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a func b < each c : a {
4+
b
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"swift::constraints::ConstraintSystem::simplifySameShapeConstraint(swift::Type, swift::Type, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
struct a < each b {
54
c(d : repeat each b) {
65
c(preacidte : b) {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::constraints::ConjunctionStep::SolverSnapshot::~SolverSnapshot()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: OS=macosx
4-
// REQUIRES: asserts
54
import Foundation{let a = malloc(b.c <d>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::EnumRawValuesRequest::evaluate(swift::Evaluator&, swift::EnumDecl*, swift::TypeResolutionStage) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<each b>(c : repeat each b) { repeat !(d c
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"(anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
extension repeat (
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"std::__1::__function::__func<resolveTypeWitnessViaLookup(swift::NormalProtocolConformance*, swift::AssociatedTypeDecl*)::$_3, std::__1::allocator<resolveTypeWitnessViaLookup(swift::NormalProtocolConformance*, swift::AssociatedTypeDecl*)::$_3>, void (swift::NormalProtocolConformance*)>::~__func()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct b let b c a = b protocol a : a
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::constraints::ContextualFailure::diagnoseConversionToBool() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a {
4+
wrappedValue : Bool {
5+
@a var b : Int
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::DefaultAndMaxAccessLevelRequest::cacheResult(std::__1::pair<swift::AccessLevel, swift::AccessLevel>) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
struct a < b extension a where b : c, d == a {
54
protocol c struct a

validation-test/compiler_crashers_2/6a33401772c7458.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"swift::constraints::GenericArgumentsMismatchFailure::GenericArgumentsMismatchFailure(swift::constraints::Solution const&, swift::Type, swift::Type, llvm::ArrayRef<unsigned int>, swift::constraints::ConstraintLocator*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
class a < b, c {
54
typealias d = b typealias e =
65
c class f<b, c> : a<b, c> class g<h, i> : f<(h, i), c> {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::TuplePattern::createSimple(swift::ASTContext&, swift::SourceLoc, llvm::ArrayRef<swift::TuplePatternElt>, swift::SourceLoc)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
switch { case (repeat a

validation-test/compiler_crashers_2/756ba8587e7eb26b.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"(anonymous namespace)::Verifier::verifyChecked(swift::Type)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
class a < b {
54
d {
65
class e<c, b> : a struct f subscript<g>(h : e<f, g>) {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ProtocolConformanceRef::forEachMissingConformance(llvm::function_ref<bool (swift::BuiltinProtocolConformance*)>) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: rdar152763265
4+
.a == .! == b / c
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::PackType::getExpandedGenericArgs(llvm::ArrayRef<swift::GenericTypeParamType*>, llvm::ArrayRef<swift::Type>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a < each b typealias c<each d> = a<> c < e
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::SourceFile::getIfConfigClausesWithin(swift::SourceRange) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
if
5+
case.(let \ a) { a
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::AccessLevelRequest::cacheResult(swift::AccessLevel) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
class a < b extension a where c == d {
54
protocol d
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::resolveOverload(swift::constraints::ConstraintLocator*, swift::Type, swift::constraints::OverloadChoice, swift::DeclContext*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a func b(c : a) {
4+
{
5+
switch
6+
c { case .baz(c==
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"conformsToInvertible(swift::CanType, swift::InvertibleProtocolKind)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a = FlattenCollection...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::TypeBase::removeArgumentLabels(unsigned int)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a dynamic subscript(b c: Int) a subscript(b c: Int) a @_dynamicReplacement(for: subscript) subscript(Int) a { }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"$s11swiftASTGen15parseSourceFile6buffer10moduleName8filename14declContextPtr4kindSVSo16BridgedStringRefV_A2ISvSgSo0n9GenerateddE4KindVtF"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: swift_swift_parser
4+
#sourceLocation """\("
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::constraints::AllowTypeOrInstanceMemberFailure::diagnoseAsError()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a func b<c >(c = a [
4+
extension a {
5+
subscript->Int
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::AbstractStorageDecl::mutability(swift::DeclContext const*, std::__1::optional<swift::DeclRefExpr const*>) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a {
4+
@a $b:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::ide::printTypeUSR(swift::Type, llvm::raw_ostream&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
class b < c class e : a<> {
5+
d = b
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::Parser::parseStmtConditionElement(llvm::SmallVectorImpl<swift::StmtConditionElement>&, swift::Diag<>, swift::StmtKind, llvm::StringRef&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
4-
func a: b[ if let
3+
func a: b[ if let
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::constraints::MissingCallFailure::diagnoseAsError()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a < each b {
4+
init(repeat each b) func c < each d { a<repeat each d, String >(repeat e, {
5+
""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::GenericEnvironment::getOrCreateArchetypeFromInterfaceType(swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@resultBuilder enum a < b { struct c{@a d:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::TypeChecker::checkObjCKeyPathExpr(swift::DeclContext*, swift::KeyPathExpr*, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
#keyPath(
5+
print

validation-test/compiler_crashers_2/a7ee60c01ddf9624.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"(anonymous namespace)::LookupResultBuilder::add(swift::ValueDecl*, swift::DeclContext*, swift::ValueDecl*, swift::Type, bool)::'lambda'(swift::ValueDecl*)::operator()(swift::ValueDecl*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
protocol a{b} protocol c : a protocol d : c extension d {
54
struct e : d {
65
f {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::associateArgumentList(swift::constraints::ConstraintLocator*, swift::ArgumentList*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol b let b = { (a : b)in switch a { case .c(d(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::DeclChecker::visit(swift::Decl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
extension(a[ 0.0 b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"diagSyntacticUseRestrictions(swift::Expr const*, swift::DeclContext const*, bool)::DiagnoseWalker::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{ @#b([a:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::ExprRewriter::coerceCallArguments(swift::ArgumentList*, swift::AnyFunctionType*, swift::ConcreteDeclRef, swift::ApplyExpr*, swift::constraints::ConstraintLocatorBuilder, llvm::ArrayRef<swift::AppliedPropertyWrapper>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<b, each c>(body : (repeat each c)->b) { body(
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::PrintingDiagnosticConsumer::printDiagnostic(swift::SourceManager&, swift::DiagnosticInfo const&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck -diagnostic-style=llvm %s
3-
// REQUIRES: asserts
43
' '
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::Constraint::create(swift::constraints::ConstraintSystem&, swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocator*, llvm::ArrayRef<swift::TypeVariableType*>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a let : a.Type.Type = b->c
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"(anonymous namespace)::Verifier::verifyParsed(swift::AbstractClosureExpr*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
func == {
54
switch {
65
case.a {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// {"signature":"swift::SubstitutionMap::get(swift::GenericSignature, swift::InFlightSubstitution&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
struct a < each b { class c protocol d init(e: c & d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::DisjunctionChoiceProducer::partitionGenericOperators(unsigned int*, unsigned int*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
print($0) $00 + 0. / 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ExpandArrayIntoVarargsFailure::tryDropArrayBracketsFixIt(swift::Expr const*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
ExpressibleByDictionaryLiteral([]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"(anonymous namespace)::ExprRewriter::buildSingleCurryThunk(swift::Expr*, swift::Expr*, swift::DeclContext*, swift::FunctionType*, swift::constraints::ConstraintLocatorBuilder)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Foundation func a(b: AnyClass?) { b (b

validation-test/compiler_crashers_2/d9fe6f57e64fee5.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// {"signature":"swift::constraints::simplifyLocator(swift::ASTNode&, llvm::ArrayRef<swift::constraints::ConstraintLocator::PathElement>&, swift::SourceRange&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
struct a { eq = "" b "Self ecuador1 Self) > Bool {
54
let getProperties = (
65
\.eq as Self -> _
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::ProtocolConformanceRef::forAbstract(swift::Type, swift::ProtocolDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: rdar152763265
4+
@resultBuilder struct a {
5+
static buildBlock<b, c, d, e>(b, c, d, e) func f<h>(_ : Bool @a Bool->h) { f(true {
6+
cond in var g : Int g 2 30\ g
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// {"signature":"swift::ASTContext::getSpecializedConformance(swift::Type, swift::NormalProtocolConformance*, swift::SubstitutionMap)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
// REQUIRES: asserts
43
protocol a{ < } protocol b { associatedtype c : a where d == Self }
54
class e<f> : a where f : b, f.c == e

0 commit comments

Comments
 (0)