mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[test] Add some more known crashers
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// {"kind":"complete","original":"186a3233","signature":"swift::ReferenceStorageType::get(swift::Type, swift::ReferenceOwnership, swift::ASTContext const&)","signatureAssert":"Assertion failed: (!T->hasTypeVariable()), function get"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
struct a<b{ c: b weak var d = \ c {
|
||||
a()#^^#
|
||||
@@ -0,0 +1,10 @@
|
||||
// {"kind":"complete","original":"ee63e244","signature":"swift::rewriting::RequirementMachine::getReducedTypeParameter(swift::CanType, llvm::ArrayRef<swift::GenericTypeParamType*>) const"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
protocol a {
|
||||
associatedtype b
|
||||
struct c: a {
|
||||
#^^#
|
||||
}
|
||||
d(b )
|
||||
#e {
|
||||
d
|
||||
@@ -0,0 +1,6 @@
|
||||
// {"kind":"typecheck","original":"bc1e9cdf","signature":"(anonymous namespace)::AssociatedTypeInference::solve()","signatureAssert":"Assertion failed: (!hasTypeParameter() && \"already have an interface type\"), function mapTypeOutOfEnvironment"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
// REQUIRES: OS=macosx
|
||||
import Distributed
|
||||
distributed actor Distributed<DefaultDistributedActorSystem> {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// {"kind":"typecheck","original":"7048f9d7","signature":"swift::KeyPathExpr::getKeyPathType() const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
{
|
||||
convenience #a(\array)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// {"kind":"emit-sil","original":"96451f18","signature":"(anonymous namespace)::LifetimeChecker::getLivenessAtInst(swift::SILInstruction*, unsigned int, unsigned int)","signatureAssert":"Assertion failed: (E <= size() && \"Attempted to set out-of-bounds range!\"), function set"}
|
||||
// RUN: not --crash %target-swift-frontend -emit-sil %s
|
||||
struct a<b> {
|
||||
let c: String
|
||||
let d: b
|
||||
}
|
||||
extension a where b == Void {
|
||||
init() {
|
||||
d <= ()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// {"kind":"typecheck","original":"30ab265f","signature":"formatDiagnosticArgument(llvm::StringRef, llvm::StringRef, llvm::ArrayRef<swift::DiagnosticArgument>, unsigned int, swift::DiagnosticFormatOptions, llvm::raw_ostream&)","signatureAssert":"Assertion failed: ((!ModifierArguments.empty() || foundPipe) && \"Index beyond bounds in %select modifier\"), function formatSelectionArgument"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: objc_interop
|
||||
import Foundation
|
||||
@objc protocol a {
|
||||
optional var name: String
|
||||
}
|
||||
extension NSObject: a {
|
||||
var names = <#expression#>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// {"kind":"typecheck","original":"6e824970","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*>>&)"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
{
|
||||
$1
|
||||
}($a: [])
|
||||
Reference in New Issue
Block a user