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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//--- test.swift
import Instance

@available(macOS 13.3.0, *)
@available(SwiftStdlib 5.8, *)
func foo(_ p: inout MutableSpan<CInt>, a: A, aa: inout A, c: C, b: B, bb: inout B) {
aa.basic(&p)
aa.bar(&p)
Expand Down
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/0dfb0607ca6550ec.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"002a4f4b","signature":"swift::PrintingDiagnosticConsumer::printDiagnostic(swift::SourceManager&, swift::DiagnosticInfo const&)","signatureAssert":"Assertion failed: ((size_t)sys::locale::columnWidth(Fixit.getText()) == Fixit.getText().size()), function buildFixItLine"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
func b<c where #^^# == <#type#>>(a: <#type#>)
9 changes: 9 additions & 0 deletions validation-test/IDE/crashers/113aa5cad622a515.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"complete","original":"3a7f38eb","signature":"swift::Mangle::ASTMangler::appendType(swift::Type, swift::GenericSignature, swift::ValueDecl const*)","signatureAssert":"Assertion failed: (paramTy->isCanonical() && \"cannot mangle non-canonical generic parameter\"), function appendType"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
class a<b> {
func
c<let d: b>()
{
#^^#
}
}
9 changes: 9 additions & 0 deletions validation-test/IDE/crashers/1a97a715994667ab.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"complete","original":"2d0bf5d7","signature":"swift::constraints::ConstraintSystem::getTypeOfReferencePre(swift::constraints::OverloadChoice, swift::DeclContext*, swift::constraints::ConstraintLocatorBuilder, swift::constraints::PreparedOverloadBuilder*)","signatureAssert":"Assertion failed: (!valueType->hasUnboundGenericType() && !valueType->hasTypeParameter()), function getTypeOfReferencePre"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
{ (a: Dictionary) in
#^^#
let b = a {
b
}
let b
}
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/1c86dd91fb8483fc.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"070481b6","signature":"swift::Mangle::ASTMangler::appendEntity(swift::ValueDecl const*)","signatureAssert":"Assertion failed: (!isa<ConstructorDecl>(decl)), function appendEntity"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
@abi( init () ) func a
#^^#()
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/1e4621d80984121a.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"3a52f860","signature":"swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*)","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
extension Sequence where a == b [ { func c { map#^^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/32fa0d633e8df376.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"95ab8e45","signature":"(anonymous namespace)::TypeResolver::resolveVarargType(swift::VarargTypeRepr*, 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
struct a<b
protocol c: a<Self
... >#^^#
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/39b75bd7c88ae4eb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"2b4a2fce","signature":"swift::constraints::ConstraintSystem::setClosureType(swift::ClosureExpr const*, swift::FunctionType*)","signatureAssert":"Assertion failed: (type), function setClosureType"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
a(
#^^# {
( ()) in
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/39e1947ce3bd2206.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"2e29372e","signature":"swift::FragileFunctionKindRequest::evaluate(swift::Evaluator&, swift::DeclContext*) const","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
if {case ( = { enum a {
#^^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/43a52bf91ab5d2ee.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"2c0990ef","signature":"swift::TypeDecl::getName() const","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
extension {
a = b [ c [ #^^#
8 changes: 8 additions & 0 deletions validation-test/IDE/crashers/724e28836dc20ecb.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"complete","original":"b09ce71a","signature":"swift::Decl::getResolvedCustomAttrType(swift::CustomAttr*) const","signatureAssert":"Assertion failed: (ctx.Diags.hadAnyError()), function evaluate","useSourceOrderCompletion":true}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-order-completion -source-filename %s
struct a<b
extension a where b == {struct c {
@d#^^#({ #^e^#}
var f }
@propertyWrapper
class d
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/7621907bdc5958a6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","original":"526e79b6","signature":"swift::TypeChecker::checkDeclAttributes(swift::Decl*)","signatureAssert":"Assertion failed: (Ctx.hadError()), function visitCustomAttr","useSourceOrderCompletion":true}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-order-completion -source-filename %s
#^^#
typealias a = . struct b {
#^c^#@a
var d =
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/7b92bb701b89b249.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"0bdbc8ea","signature":"swift::Parser::parseExprSelector()","signatureAssert":"Assertion failed: (getPtrOrNull() && \"not checked for nullptr\"), function get"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
#selector(a throws #^^#
4 changes: 2 additions & 2 deletions validation-test/IDE/crashers/81f0b4a8709d344d.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// {"kind":"complete","signature":"checkLabeledStmtShadowing(swift::ASTContext&, swift::SourceFile*, swift::LabeledStmt*)"}
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
// {"kind":"complete","signature":"bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&)","signatureAssert":"Assertion failed: (size() >= N && \"Dropping more elements than exist\"), function drop_front"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
let:{ let a=
#^COMPLETE^#{
b:{
5 changes: 5 additions & 0 deletions validation-test/IDE/crashers/87443a182257da1e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"complete","original":"bf3927a1","signature":"swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*)","signatureAssert":"Assertion failed: (isValid() && \"Can't advance an invalid location\"), function getAdvancedLoc"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
postfix operator %%
postfix func % (a)
func b c b #^^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/88987db0d0dc470c.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"092969d1","signature":"swift::ide::IDEInspectionInstance::performCachedOperationIfPossible(llvm::hash_code, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, swift::SearchPathOptions const&, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>)","signatureAssert":"Assertion failed: (reparsedInfo.Kind == newInfo.Kind), function performCachedOperationIfPossible","useSourceOrderCompletion":true}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-order-completion -source-filename %s
#^^# @
#^a^# b
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/974abc9e171ad368.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"e6459edc","signature":"swift::TypeChecker::typeCheckStmtConditionElement(swift::StmtConditionElement&, bool&, swift::DeclContext*)","signatureAssert":"Assertion failed: (!E->getType() && \"the bool condition is already type checked\"), function typeCheckBooleanStmtConditionElement"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
(if) {}#^^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/99e962b241f1d25b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"10b7f522","signature":"swift::TypeRepr::print(swift::ASTPrinter&, swift::PrintOptions const&, swift::optionset::OptionSet<swift::NonRecursivePrintOption, unsigned int>) const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
if{ extension{ a{ #^^##^b^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/9fefcf40293db48f.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","original":"2ab8a74a","signature":"swift::TypeDecl::getName() const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
extension {
subscript -> a {
@
#^^#
6 changes: 6 additions & 0 deletions validation-test/IDE/crashers/ab3972c8c6c1b5d6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"complete","original":"5070984e","signature":"swift::Decl::getResolvedCustomAttrType(swift::CustomAttr*) const","signatureAssert":"Assertion failed: ((range.isValid()) && \"scope has invalid source range\"), function getCharSourceRangeOfScope"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
@a var b {
@#^^#< #declaration
#>
}
8 changes: 8 additions & 0 deletions validation-test/IDE/crashers/ae7830cc768ad130.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"complete","original":"0715e0e8","signature":"swift::Decl::getSemanticAvailableAttr(swift::AvailableAttr const*) const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
class a {
@available(*, renamed: "request0")
!
b ,() {}
}
#^^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/b74734c97bb09b60.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"0cd48ae7","signature":"swift::TypeBase::getReducedShape()","signatureAssert":"Assertion failed: (!isTypeVariableOrMember()), function getReducedShape"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a<each b { c: (repeat each b )! { c #^^#
3 changes: 3 additions & 0 deletions validation-test/IDE/crashers/bc178c6fbc3ad18e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"complete","original":"3946e52f","signature":"(anonymous namespace)::AssociatedTypeInference::inferTypeWitnessesViaValueWitnesses(llvm::SetVector<swift::AssociatedTypeDecl*, llvm::SmallVector<swift::AssociatedTypeDecl*, 0u>, llvm::DenseSet<swift::AssociatedTypeDecl*, llvm::DenseMapInfo<swift::AssociatedTypeDecl*, void>>, 0u> const&)","signatureAssert":"Assertion failed: (false && \"Should be exhaustive\"), function checkForPotentialCycle"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a : RandomAccessCollection { class endIndex { b -> Element #^^#
7 changes: 7 additions & 0 deletions validation-test/IDE/crashers/d500691bf5d28bbc.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"complete","original":"44c76fac","signature":"bool (anonymous namespace)::StmtChecker::typeCheckStmt<swift::Stmt>(swift::Stmt*&)","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
protocol a where b == <#type#>[ {
func c() -> Self {
#^^#
}
}
7 changes: 7 additions & 0 deletions validation-test/IDE/crashers/e52359b2767fa879.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"complete","original":"108dc1e5","signature":"swift::TypeDecl::getName() 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
extension {
a {
typealias b = ()?
let c = b?? ()
#^^#
4 changes: 4 additions & 0 deletions validation-test/IDE/crashers/eaf1c77e3b7e20c6.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// {"kind":"complete","original":"2aa5adcf","signature":"swift::GenericContext::getGenericSignature() const"}
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a<b> : Collection }
a.Iterator.c #^^#
7 changes: 7 additions & 0 deletions validation-test/IDE/crashers_fixed/a1e970213e6f919d.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"complete","original":"158bd92d","signature":"swift::TypeTransform<swift::Type::transformRec(llvm::function_ref<std::__1::optional<swift::Type> (swift::TypeBase*)>) const::Transform>::doIt(swift::Type, swift::TypePosition)"}
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
struct a<b > : c protocol d { associatedtype b }
protocol c: d where b: e protocol f { associatedtype g: d associatedtype b}
protocol h: f where g == a<b> protocol i : f protocol e { associatedtype j: i
#^^#
associatedtype k: h where k.b == j.b
3 changes: 3 additions & 0 deletions validation-test/compiler_crashers_2/07e13fbf04cabfe9.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"typecheck","original":"0052e8e2","signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
// RUN: not --crash %target-swift-frontend -typecheck %s
& &<##>
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/0e9a3e1eacb8f98e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","original":"cbf69c52","signature":"swift::constraints::SolverTrail::~SolverTrail()","signatureAssert":"Assertion failed: (Changes.empty() && \"Trail corrupted\"), function ~SolverTrail"}
// RUN: not --crash %target-swift-frontend -typecheck %s
@propertyWrapper struct a<b> {
init(wrappedValue: a)
var wrappedValue: b
}
struct c {
@a @a var d: Int = 2
}
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/13d9ae996c92be12.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","original":"369523c9","signature":"swift::InFlightSubstitution::substType(swift::SubstitutableType*, unsigned int)","signatureAssert":"Assertion failed: (Ptr && \"Cannot dereference a null Type!\"), function operator->"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a {
typealias b<c, d> = a
extension b<Float, Int> {
extension b {
}
}
}
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/1e0e4ce6cf612c7b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"typecheck","signature":"checkRequirementsImpl(llvm::ArrayRef<swift::Requirement>, bool)","signatureAssert":"Assertion failed: (!firstType->hasTypeVariable()), function checkRequirementsImpl"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a<b: ~Copyable
extension a: Copyable where b: Copyable
let c (a -> d
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/254cc6af0002dea1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"typecheck","original":"ce7c1d7b","signature":"matchCallArguments(swift::constraints::ConstraintSystem&, swift::FunctionType*, swift::ArgumentList*, llvm::ArrayRef<swift::AnyFunctionType::Param>, llvm::ArrayRef<swift::AnyFunctionType::Param>, swift::constraints::ConstraintKind, swift::constraints::ConstraintLocatorBuilder, std::__1::optional<swift::constraints::TrailingClosureMatching>, llvm::SmallVectorImpl<std::__1::pair<swift::TypeVariableType*, swift::ExistentialArchetypeType*>>&)","signatureAssert":"Assertion failed: (param), function matchCallArguments"}
// RUN: not --crash %target-swift-frontend -typecheck %s
func a<each b>(c: (repeat each b) -> Void) {
c($c: d)
}
9 changes: 9 additions & 0 deletions validation-test/compiler_crashers_2/298b1482f76558b1.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// {"kind":"typecheck","original":"06d6e891","signature":"(anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (toType && !toType->hasError() && !toType->hasTypeVariableOrPlaceholder()), function coerceToType"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a<b {
@propertyWrapper struct f<b {
wrappedValue : b var projectedValue: a<b> init(projectedValue:
}
c(@f arg: Int)
func d(e: a<Int>) {
c($arg: e
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/36e4eac6ff343df0.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"typecheck","signature":"swift::constraints::TypeVarRefCollector::walkToStmtPre(swift::Stmt*)","signatureAssert":"Assertion failed: (result), function getClosureType"}
// {"kind":"typecheck","signature":"swift::constraints::ConstraintSystem::getClosureType(swift::ClosureExpr const*) const","signatureAssert":"Assertion failed: (result), function getClosureType"}
// RUN: not --crash %target-swift-frontend -typecheck %s
@propertyWrapper struct a<b {
wrappedValue: b
Expand Down
2 changes: 1 addition & 1 deletion validation-test/compiler_crashers_2/37982596fdde0b5d.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// {"kind":"typecheck","signature":"swift::constraints::MissingArgumentsFailure::diagnoseAsError()","signatureAssert":"Assertion failed: (Ptr && \"Cannot dereference a null Type!\"), function operator->"}
// {"kind":"typecheck","signature":"swift::constraints::FailureDiagnostic::resolveType(swift::Type, bool, bool) const","signatureAssert":"Assertion failed: (Ptr && \"Cannot dereference a null Type!\"), function operator->"}
// RUN: not --crash %target-swift-frontend -typecheck %s
enum a { b } {
let:
Expand Down
5 changes: 5 additions & 0 deletions validation-test/compiler_crashers_2/3e3dd6a23227714f.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// {"kind":"typecheck","original":"1e8c9260","signature":"(anonymous namespace)::ExprWalker::walkToExprPost(swift::Expr*)"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a {
callAsFunction {
\a()
7 changes: 7 additions & 0 deletions validation-test/compiler_crashers_2/43f7a6012f6a255a.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"emit-ir","original":"493cc9db","signature":"(anonymous namespace)::TypeContextDescriptorBuilderBase<(anonymous namespace)::StructContextDescriptorBuilder, swift::StructDecl>::emit()"}
// RUN: not --crash %target-swift-frontend -emit-ir %s
class a<b> {
}
@available(SwiftStdlib 6.2, *)
struct c<let d: a<e>, e> {
}
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/45fab60ba6296372.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"d550fd71","signature":"diagSyntacticUseRestrictions(swift::Expr const*, swift::DeclContext const*, bool)::DiagnoseWalker::walkToExprPre(swift::Expr*)","signatureAssert":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast"}
// RUN: not --crash %target-swift-frontend -typecheck %s
{
@<#type#>
#a([
&(b = 0)
])
}
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/50b7d05928ee8b0e.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"7f0c85e8","signature":"diagSyntacticUseRestrictions(swift::Expr const*, swift::DeclContext const*, bool)::DiagnoseWalker::walkToExprPre(swift::Expr*)","signatureAssert":"Assertion failed: (Ptr && \"Cannot dereference a null Type!\"), function operator->"}
// RUN: not --crash %target-swift-frontend -typecheck %s
class a<b, c>: ExpressibleByDictionaryLiteral {
typealias Key = b
typealias Value = c
func d<b, c>(a <b, c>) {
{
d(["": 2
8 changes: 8 additions & 0 deletions validation-test/compiler_crashers_2/56777ed1a15575c4.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// {"kind":"typecheck","original":"bb182de2","signature":"swift::constraints::ConstraintSystem::simplifyKeyPathConstraint(swift::Type, swift::Type, swift::Type, llvm::ArrayRef<swift::TypeVariableType*>, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, swift::constraints::ConstraintLocatorBuilder)","signatureAssert":"Assertion failed: (contextualRootTy && contextualValueTy), function operator()"}
// RUN: not --crash %target-swift-frontend -typecheck %s
struct a < each b > {
var
c : (repeat each b) {
(repeat \ .)
}
}
3 changes: 3 additions & 0 deletions validation-test/compiler_crashers_2/6e4c01d8fc888909.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// {"kind":"typecheck","original":"58cef9f3","signature":"swift::Parser::parseTypeInlineArray(swift::SourceLoc)","signatureAssert":"Assertion failed: (getPtrOrNull() && \"not checked for nullptr\"), function get"}
// RUN: not --crash %target-swift-frontend -typecheck %s
[[3] of
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/7498c8f669ed545b.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"typecheck","original":"18b55723","signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const","signatureAssert":"Assertion failed: (Val && \"isa<> used on a null pointer\"), function doit"}
// RUN: not --crash %target-swift-frontend -typecheck %s
// REQUIRES: OS=macosx
import Foundation
func a( CGFloat, CGFloat?)
a((1.0: (
6 changes: 6 additions & 0 deletions validation-test/compiler_crashers_2/8bd36ffa67067b41.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// {"kind":"typecheck","original":"07ee747b","signature":"swift::Type llvm::function_ref<swift::Type (swift::SubstitutableType*)>::callback_fn<swift::GenericEnvironment::mapElementTypeIntoPackContext(swift::Type) const::$_0>(long, swift::SubstitutableType*)","signatureAssert":"Assertion failed: (!elementEnv || elementEnv == archetype->getGenericEnvironment()), function operator()"}
// RUN: not --crash %target-swift-frontend -typecheck %s
func a<each b>(c: (repeat each b) -> Void) -> (repeat each b) {
{ before, each in
c(repeat before
repeat each
Loading