Skip to content

Commit 8acde34

Browse files
authored
Merge pull request #82263 from hamishknight/fuzzy
2 parents 5a1d3a8 + 05ae4c4 commit 8acde34

File tree

100 files changed

+299
-45
lines changed

Some content is hidden

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

100 files changed

+299
-45
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +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-
func a: b[ if let
3+
func a: b[ if let
Original file line numberDiff line numberDiff line change
@@ -1,3 +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-
switch { case (repeat a
3+
switch { case (repeat a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Parser::parseAbstractFunctionBody(swift::AbstractFunctionDecl*, swift::optionset::OptionSet<swift::Parser::ParseDeclFlags, unsigned short>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@abi(func a {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::Parser::parseNewDeclAttribute(swift::DeclAttributes&, swift::SourceLoc, swift::DeclAttrKind, bool)::$_4::operator()() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
class override b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::LazyStoragePropertyRequest::evaluate(swift::Evaluator&, swift::VarDecl*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
lazy(b, c) {
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"makeBinOp(swift::ASTContext&, swift::Expr*, swift::Expr*, swift::Expr*, swift::PrecedenceGroupDecl*, bool)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
let a= switch a { case &b as? b
3+
let a= switch a { case &b as? b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Parser::parseDecl(bool, bool, llvm::function_ref<void (swift::Decl*)>, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a { class override ( override
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeChecker::checkDeclAttributes(swift::Decl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a { b }
4+
@_implements(a, b) typealias c =
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::GenericContext::getGenericParams() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a = () extension a : Comparable
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::rewriting::RequirementMachine::getReducedShape(swift::Type, llvm::ArrayRef<swift::GenericTypeParamType*>) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a{ b < c > (c, _ : c}
4+
protocol d : a{
5+
b<c : e>(c, c.c) protocol e {
6+
associatedtype c struct f : d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::recordMatchCallArgumentResult(swift::constraints::ConstraintLocator*, swift::constraints::MatchCallArgumentResult)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
if
4+
case.a(a.b) = {
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::Parser::parseTypeSimple(swift::Diag<>, swift::Parser::ParseTypeReason)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
subscript(a: ~b <
3+
subscript(a: ~b <

validation-test/compiler_crashers_2/83d5136a1ea615f9.swift renamed to validation-test/compiler_crashers_2/3070c3e372b52e7e.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
struct a func b(c : a) {
44
{
55
switch
6-
c { case .baz(c==
6+
c { case .baz(c==
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::coerceCallArguments(swift::ArgumentList*, swift::AnyFunctionType*, swift::ConcreteDeclRef, swift::ApplyExpr*, swift::constraints::ConstraintLocatorBuilder, llvm::ArrayRef<swift::AppliedPropertyWrapper>)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a<b, each c>(body : (repeat each c)->b) { body(
3+
func a<b, each c>(body : (repeat each c)->b) { body(
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprWalker::rewriteTarget(swift::constraints::SyntacticElementTarget)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ Sendable(Sendable<<a
3+
{ Sendable(Sendable<<a
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"deriveBodyRawRepresentable_init(swift::AbstractFunctionDecl*, void*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
a enum a : Int { case = #/
3+
a enum a : Int { case = #/
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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-
struct a { eq = "" b "Self ecuador1 Self) > Bool {
3+
struct a { eq = "" b "Self ecuador1 Self) > Bool {
44
let getProperties = (
55
\.eq as Self -> _
66
let eq = ""
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"(anonymous namespace)::ConnectedComponents::unionSets(swift::TypeVariableType*, swift::TypeVariableType*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
let b = ( c , d a {
3+
let b = ( c , d a {
44
e b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"checkDistributedTargetResultType(swift::ValueDecl*, swift::Type, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed protocol a:DistributedActor{distributed actor:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ProtocolConformanceRef::forAbstract(swift::Type, swift::ProtocolDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
var sixDoubles
4+
: Double "six has the value [\( ( sixDoubles \[]) }0 \0\0 \0 \sixDoubles)"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::buildSingleCurryThunk(swift::Expr*, swift::Expr*, swift::DeclContext*, swift::FunctionType*, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: OS=macosx
4-
import Foundation func a(b: AnyClass?) { b (b
4+
import Foundation func a(b: AnyClass?) { b (b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeBase::getSuperclassForDecl(swift::ClassDecl const*, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
typealias b = c class e : a protocol d : e, d.b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::isRepresentableInObjC(swift::VarDecl const*, swift::ObjCReason)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
class a class b open extension b {
5+
@objc c : a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"createImplicitConstructor(swift::NominalTypeDecl*, ImplicitConstructorKind, swift::ASTContext&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a @propertyWrapper struct b < c {
4+
wrappedValue : c
5+
} @propertyWrapper struct d {
6+
var wrappedValue @b var e : a @d var f
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::ConstraintGraph::computeConnectedComponents(llvm::ArrayRef<swift::TypeVariableType*>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
let i = Array(... a { " ? \(i Array* )" }
4+
, b 1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"diagSyntacticUseRestrictions(swift::Expr const*, swift::DeclContext const*, bool)::DiagnoseWalker::walkToExprPre(swift::Expr*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ @#b([a:
3+
{ @#b([a:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::GenericEnvironment::mapTypeIntoContext(swift::Type) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@abi(func a->b) func a < b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::SimpleRequest<swift::IsStaticRequest, bool (swift::FuncDecl*), (swift::RequestFlags)4>::noteCycleStep(swift::DiagnosticEngine&) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem distributed actor a{distributed...

validation-test/compiler_crashers_2/664bfb127c7ab070.swift

Lines changed: 0 additions & 3 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < each b : Collection {
4-
c : ( repeat each b
5-
extension
4+
c : ( repeat each b
5+
extension
66
struct Index {
77
d : (repeat(each b.Index
88
} var endIndex : Index {
9-
Index(d: repeat (each c).endIndex
9+
Index(d: repeat (each c).endIndex
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::Decl::getLoc(bool) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@_typeEraser(a) protocol b dynamic func c->some b {
4+
d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::DerivedConformance::deriveDistributedActor(swift::ValueDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem distributed actor a{c, b
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// {"signature":"swift::constraints::ArrayLiteralToDictionaryConversionFailure::diagnoseAsError()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a<b{
4+
wrappedValue: b
5+
}
6+
@propertyWrapper struct c<b{
7+
wrappedValue: b
8+
}
9+
{
10+
@c @a var value = if true
11+
let : c<a<Bool>> = _value
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::DeclContext::getSelfInterfaceType() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
distributed func a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::BoundGenericType::getExpandedGenericArgs()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a func b [{ lazy var c = a(d var e = b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"(anonymous namespace)::TypeJoin::visitExistentialType(swift::CanType)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a protocol b < c { associatedtype c }
4+
[ b<a>, a & b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::PatternTypeRequest::evaluate(swift::Evaluator&, swift::ContextualPattern) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
@objcMembers class a open extension a {
5+
var b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Expr::getArgs() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a<let b: Int?{ int: Int { b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::emitLoadedModuleTraceIfNeeded(swift::ModuleDecl*, swift::DependencyTracker*, swift::FrontendOptions const&, swift::InputFile const&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a {
4+
wrappedValue : b var projectedValue init(projectedValue c) {
5+
func d(@a Int) d
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a(b : ()->Void c : _->Void) { withoutActuallyEscaping(b do : c
3+
func a(b : ()->Void c : _->Void) { withoutActuallyEscaping(b do : c

validation-test/compiler_crashers_2/e38f396e3ac8635.swift renamed to validation-test/compiler_crashers_2/89bcf379b8d4d092.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < b : FixedWidthInteger extension a : Sequence {
44
c {
5-
{ for
6-
d self { b(truncatingIfNeeded : d
5+
{ for
6+
d self { b(truncatingIfNeeded : d
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::rewriting::RequirementMachine::checkCompletionResult(swift::rewriting::CompletionResult) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a : b protocol b{associatedtype c} protocol d : e,
4+
f protocol e
5+
: g where c : e protocol g : b protocol f : a where c : f
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::TypeChecker::typesSatisfyConstraint(swift::Type, swift::Type, bool, swift::constraints::ConstraintKind, swift::DeclContext*, bool*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a<each b>(c : repeat each b) { repeat !(d c

validation-test/compiler_crashers_2/8ae148bd6e72fec2.swift

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"signature":"swift::isOverrideBasedOnType(swift::ValueDecl const*, swift::Type, swift::ValueDecl const*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a < b {
4+
protocol c { associatedtype d init(e : d
5+
}
6+
class f {
7+
init(e : Int) {
8+
class 4 : f, c { init(e : d
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"signature":"swift::constraints::AllowTypeOrInstanceMemberFailure::diagnoseAsError()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
struct a func b<c >(c = a [
3+
struct a func b<c >(c = a [
44
extension a {
55
subscript->Int
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"(anonymous namespace)::ASTScopeDeclConsumerForUnqualifiedLookup::consume(llvm::ArrayRef<swift::ValueDecl*>, swift::NullablePtr<swift::DeclContext>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
@abi(func a) var b : c
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"lookupReplacedDecl(swift::DeclNameRef, swift::DeclAttribute const*, swift::ValueDecl const*, llvm::SmallVectorImpl<swift::ValueDecl*>&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ @_dynamicReplacement(for: ) func a
3+
{ @_dynamicReplacement(for: ) func a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"diagnoseDictionaryLiteralDuplicateKeyEntries(swift::Expr const*, swift::DeclContext const*)::DiagnoseWalker::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
[ 1.01: "" 1.01: ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::ExprPattern::updateMatchExpr(swift::Expr*) const::FindMatchOperatorDeclRef::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func ~= (a) if case ~= b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeBase::getNominalParent()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a {
4+
typealias b<c> = () extension b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"$s11swiftASTGen24evaluatePoundIfCondition10astContext13diagEnginePtr16sourceFileBuffer02ifF4Text14shouldEvaluateSiSo17BridgedASTContextV_SvSo0S9StringRefVAKSbtF"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: swift_swift_parser
4+
#if canImport(#available
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"formatDiagnosticArgument(llvm::StringRef, llvm::StringRef, llvm::ArrayRef<swift::DiagnosticArgument>, unsigned int, swift::DiagnosticFormatOptions, llvm::raw_ostream&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a func b(@a Int) b($c:d
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"isVanishingTupleConformance(swift::NormalProtocolConformance*, swift::SubstitutionMap)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a<b> = (repeat b)protocol c extension a : c
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::constraints::ConstraintSystem::setTargetFor(swift::constraints::SyntacticElementTargetKey, swift::constraints::SyntacticElementTarget)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{$0=[{} }(
3+
{$0=[{} }(
44
[a:

validation-test/compiler_crashers_2/aea9b13219906649.swift renamed to validation-test/compiler_crashers_2/a04f67aa8fb22efa.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < Element {
44
b {
5-
class c : Collection { typealias Index = d subscript(e :
5+
class c : Collection { typealias Index = d subscript(e :
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::findSyntacticErrorForConsume(swift::ModuleDecl*, swift::SourceLoc, swift::Expr*, llvm::function_ref<swift::Type (swift::Expr*)>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a(consume : String) {
4+
consume consume consume
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::DeclContext::getASTContext() const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
@a({ struct b }
3+
@a({ struct b }
44
var c
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::ResolvePattern::visitCallExpr(swift::CallExpr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
enum a { b : _const a
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::constraints::MissingConformanceFailure::diagnoseTypeCannotConform(swift::Type, swift::Type) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
protocol a extension a {
4-
b { func * (Self= {
4+
b { func * (Self= {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"void swift::Diagnostic::gatherArgs<swift::Identifier, bool, swift::TypeRepr*>(swift::Identifier, bool, swift::TypeRepr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
@objcMembers class a open extension a {
5+
...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::ABIDependencyEvaluator::computeABIDependenciesForModule(swift::ModuleDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a { init? { init!
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"getIsolationFromAttributes(swift::Decl const*, bool, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
isolated let a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ContextualFailure::getDiagnosticFor(swift::ContextualTypePurpose, swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{ struct a func b< c >->c->() var : (inout a)->() = b(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::PackExpansionType::PackExpansionType(swift::Type, swift::Type, swift::RecursiveTypeProperties, swift::ASTContext const*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
[Int : Int](Int) { a, b in a[b b= b * b
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"$s11swiftASTGen19addQueuedDiagnostic20queuedDiagnosticsPtr011perFrontende5StateH04text8severity4cLoc12categoryName17documentationPath015highlightRangesH0012numHighlightT013fixItsUntypedySv_SvSo16BridgedStringRefVSo0zE8SeverityVSo0z6SourceN0VA2NSPySo0Z15CharSourceRangeVGSgSiSo0Z8ArrayRefVtF"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: swift_swift_parser
4-
class a { @objc ( : ( b
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":"swift::Parser::parseStorageRestrictionsAttribute(swift::SourceLoc, swift::SourceLoc)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@storageRestrictions(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::rewriting::RewriteSystem::processTypeDifference(swift::rewriting::TypeDifference const&, unsigned int, unsigned int, swift::rewriting::RewritePath const&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a < b class c<b, h> : a<(b, h)> protocol d {
4+
associatedtype b : c<e, f> associatedtype e associatedtype f associatedtype b
5+
: a<g>
6+
associatedtype g where g == e
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::adjustFunctionTypeForConcurrency(swift::AnyFunctionType*, swift::ValueDecl*, swift::DeclContext*, unsigned int, bool, llvm::function_ref<swift::Type (swift::AbstractClosureExpr const*)>, llvm::function_ref<bool (swift::ClosureExpr const*)>, llvm::function_ref<swift::Type (swift::Type)>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
actor a func b(isolated a...) b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose<unsigned int, unsigned int, bool>(swift::SourceLoc, swift::Diag<unsigned int, unsigned int, bool>, swift::detail::PassArgument<unsigned int>::type, swift::detail::PassArgument<unsigned int>::type, swift::detail::PassArgument<bool>::type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
class b open extension b {
5+
@objc c : a
Original file line numberDiff line numberDiff line change
@@ -1,3 +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-
switch { case .a(&b
3+
switch { case .a(&b

0 commit comments

Comments
 (0)