Skip to content

[test] Add some more known crashers #82619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Sema/CSDiagnostics.h
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ class ArgumentMismatchFailure : public ContextualFailure {
FixBehavior fixBehavior =
FixBehavior::Error)
: ContextualFailure(solution, argType, paramType, locator, fixBehavior),
Info(*getFunctionArgApplyInfo(getLocator())) {}
Info(getFunctionArgApplyInfo(getLocator()).value()) {}

bool diagnoseAsError() override;
bool diagnoseAsNote() override;
Expand Down
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/10b243ac3f1f8d7b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","signature":"swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
extension <#type#> {
var
a = "title \( init String * 0).General\(String#^COMPLETE^#0))"
}
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/1118c1956154924d.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::constraints::ConstraintSystem::assignFixedType(swift::TypeVariableType*, swift::Type, bool, bool)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
[ _""#^COMPLETE^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/15d1c6f76ad86540.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","signature":"swift::GenericSignatureImpl::getReducedType(swift::Type) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
protocol a: Collection where Iterator == b<Self> {
struct b<c: a>: IteratorProtocol
func d ->
#^COMPLETE^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/1ac322cbf02c111.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","signature":"swift::IterableDeclContext::addMemberSilently(swift::Decl*, swift::Decl*, bool) const::$_0::operator()(swift::Decl*, swift::Decl*) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
class a {b { { [ } ] in
#^COMPLETE^#
}
c)
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/23da5344b07b939.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::AnyFunctionType::getExtInfo() const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
func a(b) a#^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/34e0183b6ceafde.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ast_scope::ASTScopeImpl::getCharSourceRangeOfScope(swift::SourceManager&, bool) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
var a: b {
@ #^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/3d85becf2d330a5.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::Parser::consumeIdentifier(swift::Identifier&, bool)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
switch { case borrowing #^COMPLETE^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/488be7ca295930f4.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"doPrintTypeInterface(swift::CompilerInvocation const&, llvm::StringRef, llvm::StringRef)"}
// Actual signature: checkSingleOverride
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
class a { subscript(a) a { set } class b : a { override subscript(a) a {
#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/4c8b451fbe19cd6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"(anonymous namespace)::PreCheckTarget::simplifyTypeExpr(swift::Expr*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
macro a = { #^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/524ea7a5cd78074.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::Mangle::Mangler::finalize(llvm::raw_ostream&)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
struct a { extension b { struct c { struct d<e{ f { d#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/6492c324dc6bdc2.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::ide::AfterPoundExprCompletion::sawSolutionImpl(swift::constraints::Solution const&)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
a ##^COMPLETE^# / ( b/bin/c
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/700c7172dd0e486.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::ide::PostfixCompletionCallback::Result::tryMerge(swift::ide::PostfixCompletionCallback::Result const&, swift::DeclContext*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
Int { switch { case Optional.some()#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/7068664dc48e3152.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::ide::CodeCompletionResultType::calculateTypeRelation(swift::ide::ExpectedTypeContext const*, swift::DeclContext const*, swift::ide::USRBasedTypeContext const*) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
class a<b { init ? { #^COMPLETE^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/70921c2dbc55979.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","signature":"swift::irgen::IRGenModule::emitLazyObjCProtocolDefinition(swift::ProtocolDecl*)"}
// Actual signature: matchCallArguments
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
a(
#^COMPLETE^#[
""!
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/7361e81dcc17636c.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::constraints::TypeVarRefCollector::walkToStmtPre(swift::Stmt*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
a -> { let b = switch { case return } func c -> #^COMPLETE^#
11 changes: 11 additions & 0 deletions validation-test/IDE/crashers/73f3b9a72697ee92.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// {"kind":"complete","signature":"swift::GenericSignatureImpl::isValidTypeParameter(swift::Type) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
protocol a {
associatedtype c: a
var b: c
}
protocol d: a where c == Never
extension Never: d
extension d {
#^COMPLETE^# var
b: Never
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/7dfd3dd444f43abb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::TypeBase::isEqual(swift::Type) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
Set(
##^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/8447838e019fde.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ParserStatus llvm::function_ref<swift::ParserStatus ()>::callback_fn<swift::Parser::parseParameterClause(swift::SourceLoc&, llvm::SmallVectorImpl<swift::Parser::ParsedParameter>&, swift::SourceLoc&, swift::Parser::DefaultArgumentInfo*, swift::Parser::ParameterContextKind)::$_0>(long)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
func(=1 as
#^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/8659dc98be5856f6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
extension {
a { discard b#^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/8681205caefae96e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ide::CompletionLookup::getPostfixKeywordCompletions(swift::Type, swift::Expr*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
func a(b: (() -> Float)!) {
b()#^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/88724bf42982b346.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ide::printTypeUSR(swift::Type, llvm::raw_ostream&)"}
// Actual signature: getContextSubstitutions
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
protocol a extension a where Self == { extension a#^COMPLETE^# protocol b
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/96faa1ddefcb57f.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::Demangle::ASTBuilder::findTypeDecl(swift::DeclContext*, swift::Identifier, swift::Identifier, swift::Demangle::Node::Kind)"}
// Actual signature: openTypeParameter
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
struct a<b:RangeReplaceableCollection where b ={ c: b.Element? { #^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/9a6a167b9c9fe2e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::ide::CompletionLookup::addCallArgumentPatterns(swift::ide::CodeCompletionResultBuilder&, llvm::ArrayRef<swift::AnyFunctionType::Param>, llvm::ArrayRef<swift::ParamDecl const*>, swift::GenericSignature, bool)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
func a<each b>( repeat each b)c == a(
#^COMPLETE^# d
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/a41cd43f2f603f31.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"(anonymous namespace)::CodeCompletionCallbacksImpl::completeAccessorBeginning(swift::CodeCompletionExpr*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
case <#expression#>= { protocol a { #^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/a51bc03e2023ede5.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::constraints::ConstraintSystem::buildDisjunctionForOptionalVsUnderlying(swift::Type, swift::Type, swift::constraints::ConstraintLocator*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
class a {b: c! = b #^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/ab16c0e38dae31b3.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::Mangle::ASTMangler::appendType(swift::Type, swift::GenericSignature, swift::ValueDecl const*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
func a<let b
#^COMPLETE^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/acb013ae9149246.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"swift::DeclContext::getASTContext() const+0xbc"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
@ a(
#^COMPLETE^# {}
let b
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/b72ab48c2f29a3a.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::rewriting::RequirementMachine::getReducedShape(swift::Type, llvm::ArrayRef<swift::GenericTypeParamType*>) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
class a<b{ c { struct d<f where f.e#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/bf2a1e697e134b1b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::MacroDefinitionRequest::evaluate(swift::Evaluator&, swift::MacroDecl*) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
macro a = ( @freestanding macro b = a#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/c65ac26afb25b40.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::DeclRefTypeRepr::DeclRefTypeRepr(swift::TypeReprKind, swift::DeclNameRef, swift::DeclNameLoc, unsigned int, bool)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
{ #^COMPLETE^#@storageRestrictions(
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/ce6e7a44344828a0.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","signature":"swift::constraints::ConstraintSystem::addUnresolvedValueMemberConstraint(swift::Type, swift::DeclNameRef, swift::Type, swift::DeclContext*, swift::FunctionRefInfo, swift::constraints::ConstraintLocatorBuilder)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
enum a }
{
var b: a func c { switch b {
#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/d02ac29b7ce07e7d.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::ide::getTypeForCompletion(swift::constraints::Solution const&, swift::ASTNode)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
#fileLiteral(#^COMPLETE^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/d3a218e4a4e3b8e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","signature":"swift::ParseAbstractFunctionBodyRequest::evaluate(swift::Evaluator&, swift::AbstractFunctionDecl*) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
defer{ var #^COMPLETE^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/f03bb3278d3341d9.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"swift::PersistentParserState::restoreIDEInspectionDelayedDeclState(swift::IDEInspectionDelayedDeclState const&)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
guard {
#if #^COMPLETE^#
0
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/f13530ddd8d62d26.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"swift::NominalTypeDecl::prepareConformanceTable() const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
protocol a< b {
associatedtype b
func c<d>: a<d>#^COMPLETE^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/f98762f9df9ed0fa.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"swift::rewriting::RewriteContext::getMutableTermForType(swift::CanType, swift::ProtocolDecl const*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
protocol a { associatedtype b }
protocol c { associatedtype b }
extension c { compose<d where d ==a, d.b == b { #^COMPLETE^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/fa71279755a2cb53.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","signature":"swift::GenericSignatureImpl::requiresClass(swift::Type) const"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
protocol a { associatedtype c: a var b: c }
protocol d: a where c == Never extension Never: d extension d { b: Never { #^COMPLETE^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/fd1bd523c6eba84d.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","signature":"swift::Parser::parseLineDirective(bool)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
{
#sourceLocation(file: "", line: 800)
#^COMPLETE^#
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/16638651735c2c8.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"typecheck","signature":"swift::TypeChecker::checkProtocolSelfRequirements(swift::ValueDecl*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a {
associatedtype b
func c () where b : AnyObject
}
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/267b1378f37f8563.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"signature":"swift::constraints::ArgumentMismatchFailure::diagnoseAttemptedRegexBuilder() const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol b {
c<each d >(repeat each d, e: (
}
func bar(a: b) {
a.c(e : ""
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/2c8d3a95fcb84248.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"typecheck","signature":"swift::recordRequiredImportAccessLevelForDecl(swift::Decl const*, swift::DeclContext const*, swift::AccessLevel, std::__1::function<void (swift::AttributedImport<swift::ImportedModule>)>)"}
// RUN: %empty-directory(%t)
// RUN: not --crash %target-swift-frontend -typecheck -sdk %t %s
// REQUIRES: OS=macosx
import Distributed
distributed actor a {
}
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/35c1917cd0f5ba23.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"signature":"swift::ASTWalker::PostWalkResult<swift::DynamicTypeExpr*> (anonymous namespace)::Verifier::dispatchVisitPost<swift::DynamicTypeExpr*>(swift::DynamicTypeExpr*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
class a {
}
[].filter {
type(of: $0) == a.self
}
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/5cc8bc3069f97958.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","signature":"(anonymous namespace)::TypeResolver::resolveImplicitlyUnwrappedOptionalType(swift::ImplicitlyUnwrappedOptionalTypeRepr*, swift::TypeResolutionOptions, bool)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
enum a: b! {
}
guard a else {
}
}
4 changes: 4 additions & 0 deletions validation-test/compiler_crashers_2/70bfb18ab58de217.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"signature":"swift::GenericContext::getGenericSignature() const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a < let b : c
class c < b : a
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/78fae776bebcee10.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"signature":"swift::QualifiedLookupRequest::evaluate(swift::Evaluator&, swift::DeclContext const*, llvm::SmallVector<swift::NominalTypeDecl*, 4u>, swift::DeclNameRef, swift::NLOptions) const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
extension a {
b {
func c<d>(e : d) {
e = f
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/7c811b5446136.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"signature":"swift::constraints::ConstraintSystem::matchTypes(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
weak var a : b? a
class c
class b
weak var a: c?
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/82fe033c6bdba61.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"signature":"swift::ReferencedAssociatedTypesRequest::evaluate(swift::Evaluator&, swift::ValueDecl*) const::Walker::walkToTypePre(swift::Type)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a {
var
b, c : Codable {
self
}
}
14 changes: 14 additions & 0 deletions validation-test/compiler_crashers_2/87bf05037516d84.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// {"kind":"typecheck","signature":"swift::rewriting::RewritePathEvaluator::applyRewriteRule(swift::rewriting::RewriteStep const&, swift::rewriting::RewriteSystem const&)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a {
associatedtype b : a where b.b == c
}
protocol d {
associatedtype e : a
associatedtype c : d
struct f<e : a> : d {
typealias c = f<e.b>
protocol g : d where c == f<e> {
}
}
}
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/8867bfc8cf158ddb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"signature":"swift::ClassDecl::isSuperclassOf(swift::ClassDecl const*) const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
class a {
typealias b = <#type#>
}
class c< d > : a< > {
}
c.b
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/89acda2815351ec6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"signature":"(anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder)::$_3::operator()(swift::Type, swift::Type) const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
func a(inout _ )
var b = String
a(b
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/8b32e8ab4ca6b321.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"typecheck","signature":"swift::AnyFunctionType* swift::TypeBase::castTo<swift::AnyFunctionType>()"}
// RUN: not --crash %target-swift-frontend -typecheck %s
subscript(a: Int?) -> <#type#> {
var b = a
Float(b)
}
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/ad9313b914fb2.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"signature":"swift::SimpleRequest<swift::InheritedDeclsReferencedRequest, std::__1::pair<llvm::TinyPtrVector<swift::TypeDecl*>, swift::InvertibleProtocolSet> (llvm::PointerUnion<swift::TypeDecl const*, swift::ExtensionDecl const*>, unsigned int), (swift::RequestFlags)1>::noteCycleStep(swift::DiagnosticEngine&) const"}
// RUN: not --crash %target-swift-frontend -typecheck %s
class a
let _ b = a
class b : b.c
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/c232a2df5b6fffd.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"signature":"swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, swift::DeclContext*, bool, swift::FunctionRefInfo, swift::constraints::ConstraintLocator*, llvm::SmallVectorImpl<std::__1::pair<swift::GenericTypeParamType*, swift::TypeVariableType*>>*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a < let b > {
func
< (c : Self) {
c.b
}
}
12 changes: 12 additions & 0 deletions validation-test/compiler_crashers_2/c7f6f9dc8e8c9d71.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// {"signature":"swift::constraints::ConstraintSystem::setBuilderTransformedBody(swift::AnyFunctionRef, swift::NominalTypeDecl*, swift::NullablePtr<swift::VarDecl>, swift::NullablePtr<swift::BraceStmt>)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a {
@resultBuilder struct b
}
struct c < d {
init(@b content : () -> d
}
extension c : a
struct b {
e {
c {
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/d5eedcc26a9ca1f.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"signature":"swift::TypeBase::getReducedShape()"}
// RUN: not --crash %target-swift-frontend -typecheck %s
typealias a <b> = ()
extension a {
c {
d
}
d
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/da315410694f4a15.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"signature":"extendDepthMap(swift::Expr*, llvm::DenseMap<swift::Expr*, std::__1::pair<unsigned int, swift::Expr*>, llvm::DenseMapInfo<swift::Expr*, void>, llvm::detail::DenseMapPair<swift::Expr*, std::__1::pair<unsigned int, swift::Expr*>>>&)::RecordingTraversal::walkToExprPost(swift::Expr*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
{
func a {
if
#_hasSymbol(
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/ef6fa0626973e94.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"signature":"(anonymous namespace)::ImplicitSelfUsageChecker::isClosureRequiringSelfQualification(swift::AbstractClosureExpr const*, bool)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a : ExpressibleByBooleanLiteral {
c(d : Bool -> (
}
{
a(true).c {
b in
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/fef9fa2b91e98ff.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"signature":"swift::ExistentialArchetypeType::get(swift::CanType)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a where b == Self
protocol c : a where Self
: CustomStringConvertible
var d e c.description
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"signature":"$s11swiftASTGen15parseSourceFile6buffer10moduleName8filename14declContextPtr4kindSVSo16BridgedStringRefV_A2ISvSgSo0n9GenerateddE4KindVtF"}
// RUN: not %target-swift-frontend -typecheck %s
"foobar""" a ab"""