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
2 changes: 1 addition & 1 deletion validation-test/IDE/crashers/38a36bbefc496da.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"complete","original":"61e9155a","signature":"swift::ide::ContextFreeCodeCompletionResult::getCodeCompletionDeclKind(swift::Decl const*)"}
// {"kind":"complete","original":"61e9155a","signature":"swift::ide::CodeCompletionResultBuilder::takeResult()"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
extension ()
where
Expand Down
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/44e8aa11615df18.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"8af9696a","signature":"(anonymous namespace)::TypePrinter::printWithParensIfNotSimple(swift::Type)","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
// REQUIRES: OS=macosx
import Foundation
var a: some NSMutableArray = a == #^^# = <#expression#>
2 changes: 1 addition & 1 deletion validation-test/IDE/crashers/524ea7a5cd78074.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// {"kind":"complete","signature":"swift::Mangle::ASTMangler::mangleDeclAsUSR(swift::ValueDecl const*, llvm::StringRef)"}
// {"kind":"complete","signature":"swift::ide::CodeCompletionResultBuilder::takeResult()"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a { extension b { struct c { struct d<e{ f { d#^COMPLETE^#
9 changes: 9 additions & 0 deletions validation-test/IDE/crashers/6e14da1a44c1cdc6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"complete","original":"8b824012","signature":"swift::Mangle::ASTMangler::appendBoundGenericArgs(swift::DeclContext*, swift::GenericSignature, swift::SubstitutionMap, bool&, swift::ValueDecl const*)","signatureAssert":"Assertion failed: (Index < Length && \"Invalid index!\"), function operator[]"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
protocol a {
struct b {
var c: (some Any, Int) {
#^^#
}
}
}
2 changes: 1 addition & 1 deletion validation-test/IDE/crashers/796ef3e298a05a47.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"complete","original":"5d283fee","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const"}
// {"kind":"complete","original":"5d283fee","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const","signatureAssert":"Assertion failed: (ext->canNeverBeBound() && \"Should have been bound by bindExtensions\"), function evaluate"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
@abi(
extension { #^^#<#declaration#>)
Expand Down
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/8b1e4c7f2174671c.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"2201e4ed","signature":"swift::Mangle::ASTMangler::mangleDeclAsUSR(swift::ValueDecl const*, llvm::StringRef)"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
enum a<b{ protocol c{ class d{ class f<b let e=f #^^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/8fb80df278d76cd.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"098f0ede","signature":"swift::ide::CodeCompletionStringBuilder::addTypeAnnotation(swift::Type, swift::DeclContext const*, swift::GenericSignature)","signatureAssert":"Assertion failed: (genericFuncType->getGenericSignature()->isEqual(genericSig) && \"if not, just use the GFT's signature instead below\"), function eraseArchetypes"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
enum a<b> {
c=d#^^# macro d()
}
2 changes: 1 addition & 1 deletion validation-test/IDE/crashers/9a6a167b9c9fe2e.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"complete","signature":"swift::ide::CodeCompletionStringBuilder::addCallArgumentPatterns(llvm::ArrayRef<swift::AnyFunctionType::Param>, llvm::ArrayRef<swift::ParamDecl const*>, swift::DeclContext const*, swift::GenericSignature, bool)","signatureAssert":"Assertion failed: (declParams.empty() || typeParams.size() == declParams.size()), function addCallArgumentPatterns"}
// {"kind":"complete","signature":"swift::ide::CodeCompletionStringBuilder::addCallArgumentPatterns(llvm::ArrayRef<swift::AnyFunctionType::Param>, llvm::ArrayRef<swift::ParamDecl const*>, swift::DeclContext const*, swift::GenericSignature, swift::ide::DefaultArgumentOutputMode, bool)","signatureAssert":"Assertion failed: (declParams.empty() || typeParams.size() == declParams.size()), function addCallArgumentPatterns"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
func a<each b>( repeat each b)c == a(
#^COMPLETE^# d
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/cdc75ec659bc26a6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"a4349038","signature":"(anonymous namespace)::TypeResolver::resolveTupleType(swift::TupleTypeRepr*, swift::TypeResolutionOptions)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoContext"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
func a<b > -> () [ {
var : (b) #^^#
13 changes: 13 additions & 0 deletions validation-test/compiler_crashers_2/36e4eac6ff343df0.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// {"kind":"typecheck","signature":"swift::constraints::TypeVarRefCollector::walkToStmtPre(swift::Stmt*)","signatureAssert":"Assertion failed: (result), function getClosureType"}
// RUN: not --crash %target-swift-frontend -typecheck %s
@propertyWrapper struct a<b {
wrappedValue: b
}
func c( Bool)d {
@a var e: Bool? =
if .random() {
return
} else {
true
}
c(e
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/40188c379c9ebe45.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"b8967a13","signature":"(anonymous namespace)::ActorIsolationChecker::checkLocalCaptures(swift::AnyFunctionRef)","signatureAssert":"Assertion failed: (Captures.hasBeenComputed()), function getCaptureInfo"}
// RUN: not --crash %target-swift-frontend -typecheck %s
func a() {
extension <#type#> {
var b = {
}
}
}
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/4059e8d9978c8be6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"4dcd6877","signature":"swift::Parser::parseStmtForEach(swift::LabeledStmtInfo)","signatureAssert":"Assertion failed: (InBindingPattern == PatternBindingState::NotInBinding && \"for-each loops cannot exist inside other patterns\"), function parseStmtForEach"}
// RUN: not --crash %target-swift-frontend -typecheck %s
guard
let if <#expression#> {
for <#pattern#> in <#expression#> {
}
} else {
}
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/dc5f791705b1cca.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","signature":"swift::constraints::TypeVarRefCollector::walkToStmtPre(swift::Stmt*)","signatureAssert":"Assertion failed: (result), function getClosureType"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
lazy var a =
if <#expression#> {
return
}
a
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"typecheck","original":"f7872afc","signature":"swift::ParamDecl::setTypeCheckedDefaultExpr(swift::Expr*)","signatureAssert":"Assertion failed: (E || getDefaultArgumentKind() == DefaultArgumentKind::Inherited), function setTypeCheckedDefaultExpr"}
// RUN: not %target-swift-frontend -typecheck %s
struct a {
init<b>(b = a(