mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85537 from hamishknight/fuzzy
[test] Add some more known crashers
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
// {"kind":"complete","original":"00fc7609","signature":"(anonymous namespace)::CodeCompletionCallbacksImpl::typecheckParsedType()","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
protocol a:Self#^^#
|
||||
@@ -0,0 +1,5 @@
|
||||
// {"kind":"complete","original":"0435fa64","signature":"swift::ide::CompletionLookup::foundDecl(swift::ValueDecl*, swift::DeclVisibilityKind, swift::DynamicLookupInfo)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
extension Sequence where a == <#type#>[ {
|
||||
#^^#
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// {"kind":"complete","original":"0116e8cd","signature":"swift::ConformanceChecker::resolveWitnessViaLookup(swift::ValueDecl*)","signatureAssert":"Assertion failed: (Conformance->getWitnessUncached(requirement).getDecl() == match.Witness && \"Deduced different witnesses?\"), function recordWitness"}
|
||||
// {"kind":"complete","original":"0116e8cd","signature":"swift::ConformanceChecker::recordWitness(swift::ValueDecl*, swift::RequirementMatch const&)","signatureAssert":"Assertion failed: (Conformance->getWitnessUncached(requirement).getDecl() == match.Witness && \"Deduced different witnesses?\"), function recordWitness"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
struct a: OptionSet {
|
||||
static rawValue = a init(rawValue: Int ) {
|
||||
@@ -0,0 +1,3 @@
|
||||
// {"kind":"complete","original":"bcb7c8c1","signature":"(anonymous namespace)::ConstraintGenerator::visitTapExpr(swift::TapExpr*)","signatureAssert":"Assertion failed: ((varDC == CS.DC || isa<AbstractClosureExpr>(varDC) || varDC->isChildContextOf(CS.DC)) && \"TapExpr var should be in the same DeclContext we're checking it in!\"), function visitTapExpr"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
func a -> @b("\()." #^^#
|
||||
@@ -1,4 +1,4 @@
|
||||
// {"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"}
|
||||
// {"kind":"complete","original":"7f4bcc9e","signature":"swift::DeclContext::getDeclaredTypeInContext() const"}
|
||||
// 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() -> #^^#
|
||||
@@ -0,0 +1,3 @@
|
||||
// {"kind":"complete","original":"e6459edc","signature":"swift::TypeChecker::typeCheckCondition(swift::Expr*&, swift::DeclContext*)","signatureAssert":"Assertion failed: (!expr->getType() && \"the bool condition is already type checked\"), function typeCheckCondition"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
(if) {}#^^#
|
||||
@@ -1,3 +0,0 @@
|
||||
// {"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) {}#^^#
|
||||
@@ -0,0 +1,4 @@
|
||||
// {"kind":"complete","original":"d73870ca","signature":"swift::TypeResolution::resolveContextualType(swift::TypeRepr*, swift::DeclContext*, swift::GenericSignature, swift::TypeResolutionOptions, llvm::function_ref<swift::Type (swift::UnboundGenericType*)>, llvm::function_ref<swift::Type (swift::ASTContext&, swift::PlaceholderTypeRepr*)>, llvm::function_ref<swift::Type (swift::Type, swift::PackElementTypeRepr*)>, llvm::function_ref<void (swift::GenericTypeDecl*, llvm::function_ref<swift::Type (swift::SubstitutableType*)>)>, swift::SILTypeResolutionContext*)","signatureAssert":"Assertion failed: (!type->hasTypeParameter() && \"no generic environment provided for type with type parameters\"), function mapTypeIntoEnvironment"}
|
||||
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
||||
@ a(b
|
||||
#^^# struct c<b
|
||||
@@ -1,4 +1,4 @@
|
||||
// {"kind":"typecheck","original":"cb3e622a","signature":"swift::ast_scope::ASTScopeImpl::checkSourceRangeBeforeAddingChild(swift::ast_scope::ASTScopeImpl*, swift::ASTContext const&) const"}
|
||||
// {"kind":"typecheck","original":"cb3e622a","signature":"swift::ast_scope::ASTScopeImpl::addChild(swift::ast_scope::ASTScopeImpl*, swift::ASTContext&)"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
{
|
||||
let a,
|
||||
@@ -1,4 +0,0 @@
|
||||
// {"kind":"typecheck","signature":"swift::AbstractStorageDecl::mutability(swift::DeclContext const*, std::__1::optional<swift::DeclRefExpr const*>) const","signatureAssert":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
@propertyWrapper struct a {
|
||||
@a $b:
|
||||
@@ -0,0 +1,4 @@
|
||||
// {"kind":"typecheck","signature":"swift::AvailabilityContext::forDeclSignature(swift::Decl const*)"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
@_typeEraser(a) protocol b dynamic func c->some b {
|
||||
d
|
||||
@@ -0,0 +1,3 @@
|
||||
// {"kind":"typecheck","original":"1d97bdbd","signature":"swift::constraints::ConstraintGraph::computeConnectedComponents(llvm::ArrayRef<swift::TypeVariableType*>)","signatureAssert":"Assertion failed: (component != components.end()), function operator()"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
let i =... a { " ? \(i Array* )" [
|
||||
@@ -1,4 +0,0 @@
|
||||
// {"kind":"typecheck","signature":"swift::Decl::getLoc(bool) const","signatureAssert":"Assertion failed: (Val && \"isa<> used on a null pointer\"), function doit"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
@_typeEraser(a) protocol b dynamic func c->some b {
|
||||
d
|
||||
@@ -0,0 +1,3 @@
|
||||
// {"kind":"typecheck","signature":"swift::Expr::canAppendPostfixExpression(bool) const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
struct a<let b: Int?{ int: Int { b
|
||||
@@ -0,0 +1,5 @@
|
||||
// {"kind":"typecheck","original":"ee11d1cb","signature":"(anonymous namespace)::ExprRewriter::visitPackExpansionExpr(swift::PackExpansionExpr*)","signatureAssert":"Assertion failed: (environment), function visitPackExpansionExpr"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
{
|
||||
repeat [each $0]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// {"kind":"typecheck","signature":"swift::constraints::MissingOptionalUnwrapFailure::offerForceUnwrapFixIt(swift::Expr const*) const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
struct a<let b: Int?{ int: Int { b
|
||||
@@ -0,0 +1,4 @@
|
||||
// {"kind":"typecheck","signature":"swift::PropertyWrapperAuxiliaryVariablesRequest::evaluate(swift::Evaluator&, swift::VarDecl*) const"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
@propertyWrapper struct a {
|
||||
@a $b:
|
||||
@@ -0,0 +1,3 @@
|
||||
// {"kind":"emit-silgen","original":"7b4a72a9","signature":"swift::Lowering::SILGenBuilder::createEnum(swift::SILLocation, swift::Lowering::ManagedValue, swift::EnumElementDecl*, swift::SILType)","signatureAssert":"Assertion failed: (v->getType().isObject()), function operator()"}
|
||||
// RUN: not --crash %target-swift-frontend -emit-silgen %s
|
||||
var a: Any = ["": [a]] as [String: [AnyObject?]]
|
||||
@@ -1,4 +0,0 @@
|
||||
// {"kind":"typecheck","signature":"swift::constraints::SameTypeRequirementFailure::SameTypeRequirementFailure(swift::constraints::Solution const&, swift::Type, swift::Type, swift::constraints::ConstraintLocator*)","signatureAssert":"Assertion failed: (getGenericContext() && \"Affected decl not within a generic context?\"), function RequirementFailure"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
protocol a struct b extension Dictionary : a where Value == let func !c {
|
||||
let d : [Int:b] let : a = d
|
||||
@@ -0,0 +1,4 @@
|
||||
// {"kind":"typecheck","signature":"swift::constraints::SkipSameTypeRequirement::diagnose(swift::constraints::Solution const&, bool) const","signatureAssert":"Assertion failed: (getGenericContext() && \"Affected decl not within a generic context?\"), function RequirementFailure"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
protocol a struct b extension Dictionary : a where Value == let func !c {
|
||||
let d : [Int:b] let : a = d
|
||||
@@ -0,0 +1,6 @@
|
||||
// {"kind":"typecheck","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
|
||||
struct a {
|
||||
callAsFunction( ())
|
||||
{
|
||||
a {
|
||||
@@ -1,4 +1,4 @@
|
||||
// {"kind":"typecheck","signature":"(anonymous namespace)::TypeJoin::join(swift::CanType, swift::CanType)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
|
||||
// {"kind":"typecheck","signature":"(anonymous namespace)::TypeJoin::visitProtocolCompositionType(swift::CanType)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
|
||||
// RUN: not --crash %target-swift-frontend -typecheck %s
|
||||
class a protocol b < c { associatedtype c }
|
||||
[ b<a>, a & b
|
||||
@@ -1,3 +0,0 @@
|
||||
// {"kind":"emit-silgen","original":"7b4a72a9","signature":"swift::getSILValueOwnership(llvm::ArrayRef<swift::SILValue>, swift::SILType)","signatureAssert":"Assertion failed: (v->getType().isObject()), function operator()"}
|
||||
// RUN: not --crash %target-swift-frontend -emit-silgen %s
|
||||
var a: Any = ["": [a]] as [String: [AnyObject?]]
|
||||
Reference in New Issue
Block a user