Skip to content
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
11 changes: 11 additions & 0 deletions validation-test/IDE/crashers/4334b05c244e77cf.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// {"kind":"complete","original":"1a6ddccd","signature":"getRequirementMachine"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -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 {
public( #^^#
b: Never
9 changes: 9 additions & 0 deletions validation-test/IDE/crashers/55f0ac4dba91c84.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"complete","original":"df6ac250","signature":"bool llvm::function_ref<bool (swift::constraints::Constraint*)>::callback_fn<swift::constraints::ConstraintSystem::simplifyAppliedOverloadsImpl(swift::constraints::Constraint*, swift::TypeVariableType*, swift::FunctionType*, unsigned int, swift::constraints::ConstraintLocatorBuilder)::$_2>(long, swift::constraints::Constraint*)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a {
b func b()
#if {
b(<#expression#>)
}#^^#
#endif
}
8 changes: 8 additions & 0 deletions validation-test/IDE/crashers/c9b7522368139eb7.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"complete","original":"ad5b343d","signature":"swift::InterfaceTypeRequest::cacheResult(swift::Type) const","signatureAssert":"Assertion failed: (!type->is<InOutType>() && \"Interface type must be materializable\"), function cacheResult"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
[
#^^#
].reduce?(
[:][0] {
$a, b in
})
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/dc8881dce3e968b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"6384b7fc","signature":"swift::TypeChecker::typeCheckForCodeCompletion(swift::constraints::SyntacticElementTarget&, bool, llvm::function_ref<void (swift::constraints::Solution const&)>)","signatureAssert":"Assertion failed: (fallback->E != expr), function typeCheckForCodeCompletion"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
func a -> b
a > (c > a #^^# )'
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/dffa2c2577e3e11.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"7f4bcc9e","signature":"swift::DeclContext::getDeclaredInterfaceType() const","signatureAssert":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
extension Sequence where a == b[ {
func c() -> #^^#
}
2 changes: 1 addition & 1 deletion validation-test/IDE/crashers/e8698acd627edfb.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// {"kind":"complete","original":"bae855bf","signature":"swift::GenericSignatureRequest::diagnoseCycle(swift::DiagnosticEngine&) const","signatureAssert":"Assertion failed: (!ActiveDiagnostic && \"Already have an active diagnostic\"), function diagnose"}
// {"kind":"complete","original":"bae855bf","signature":"swift::GenericTypeParamDecl::getSourceRange() const","signatureAssert":"Assertion failed: (Start.isValid() == End.isValid() && \"Start and end should either both be valid or both be invalid!\"), function SourceRange"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
class a<b: c, b extension a where b #^^#
11 changes: 11 additions & 0 deletions validation-test/compiler_crashers_2/28db756e678d736.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// {"kind":"emit-silgen","signature":"swift::Lowering::SILGenModule::useConformance(swift::ProtocolConformanceRef)"}
// RUN: not --crash %target-swift-frontend -emit-silgen %s
protocol a {
}
struct b<c: a> {
}
extension [b<Int>] {
func d() {
first
}
}
10 changes: 10 additions & 0 deletions validation-test/compiler_crashers_2/2a435f4c7a59cd72.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// {"kind":"typecheck","original":"b3234b81","signature":"swift::constraints::ConstraintSystem::recordImpliedResult(swift::Expr*, swift::constraints::ImpliedResultKind)","signatureAssert":"Assertion failed: (inserted && \"Duplicate implied result?\"), function recordImpliedResult"}
// RUN: not --crash %target-swift-frontend -typecheck %s
[
switch 0 {
case .a(
if <#expression#> {
b
}):
}
]
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/5b22e7353651698.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","original":"6f23f24c","signature":"diagnoseUnintendedOptionalBehavior(swift::Expr const*, swift::DeclContext const*)::UnintendedOptionalBehaviorWalker::walkToExprPre(swift::Expr*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
@<#type#>
#a {
&b
0 as c
}
}
10 changes: 10 additions & 0 deletions validation-test/compiler_crashers_2/699345a5431680.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// {"kind":"typecheck","original":"96fa6e3e","signature":"swift::StorageImplInfoRequest::evaluate(swift::Evaluator&, swift::AbstractStorageDecl*) const","signatureAssert":"Assertion failed: (info.hasStorage() == storage->hasStorage() || storage->getASTContext().Diags.hadAnyError()), function evaluate"}
// RUN: not --crash %target-swift-frontend -typecheck %s
class a {
func b() {
override var c: Any {
didSet {
}
}
}
}
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/75bcc84cc8b7789.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"typecheck","original":"7e87f396","signature":"swift::Mangle::ASTMangler::appendOpaqueTypeArchetype(swift::ArchetypeType*, swift::OpaqueTypeDecl*, swift::SubstitutionMap, swift::GenericSignature, swift::ValueDecl const*)","signatureAssert":"Assertion failed: (subs.isIdentity()), function appendOpaqueTypeArchetype"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a
func b<c> -> some a where c
=
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/a8c84d1122922f83.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"typecheck","original":"bee4b7dd","signature":"swift::constraints::ContextualFailure::tryProtocolConformanceFixIt(swift::InFlightDiagnostic&) const","signatureAssert":"Assertion failed: (!missingProtoTypeStrings.empty() && \"type already conforms to all the protocols?\"), function tryProtocolConformanceFixIt"}
// {"kind":"typecheck","original":"bee4b7dd","signature":"swift::constraints::ContextualFailure::tryProtocolConformanceFixIt() const","signatureAssert":"Assertion failed: (!missingProtoTypeStrings.empty() && \"type already conforms to all the protocols?\"), function tryProtocolConformanceFixIt"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a<b, c> {
associatedtype b
Expand Down
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/be64bc4123212eee.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","signature":"swift::constraints::RequirementFailure::RequirementFailure(swift::constraints::Solution const&, swift::Type, swift::Type, swift::constraints::ConstraintLocator*)","signatureAssert":"Assertion failed: (AffectedDecl), function RequirementFailure"}
// RUN: not --crash %target-swift-frontend -typecheck %s
protocol a
struct b<c
extension b where c: a {
typealias d<c> =
}
b<Int>
.d
15 changes: 15 additions & 0 deletions validation-test/compiler_crashers_2_fixed/d815492a6398a52.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// {"kind":"typecheck","original":"cc407c71","signature":"(anonymous namespace)::TypeSubstituter::transformOpaqueTypeArchetypeType(swift::OpaqueTypeArchetypeType*, swift::TypePosition)","stackOverflow":true}
// RUN: not %target-swift-frontend -typecheck %s
protocol a
@resultBuilder struct b {
static buildBlock<each c>(repeat each c) -> d<repeat each c>
}
struct d<each e
struct f<e {
@b content: e
}
extension f: a
var body: some a {
f {
f {
body