Skip to content

Commit 20d04a9

Browse files
committed
[test] Add a few more known type-checker crashers
1 parent 6570da3 commit 20d04a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+232
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Parser::parseAbstractFunctionBody(swift::AbstractFunctionDecl*, swift::optionset::OptionSet<swift::Parser::ParseDeclFlags, unsigned short>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@abi(func a {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::Parser::parseNewDeclAttribute(swift::DeclAttributes&, swift::SourceLoc, swift::DeclAttrKind, bool)::$_4::operator()() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
class override b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::LazyStoragePropertyRequest::evaluate(swift::Evaluator&, swift::VarDecl*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
lazy(b, c) {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeChecker::checkDeclAttributes(swift::Decl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a { b }
4+
@_implements(a, b) typealias c =
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::GenericContext::getGenericParams() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a = () extension a : Comparable
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::rewriting::RequirementMachine::getReducedShape(swift::Type, llvm::ArrayRef<swift::GenericTypeParamType*>) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a{ b < c > (c, _ : c}
4+
protocol d : a{
5+
b<c : e>(c, c.c) protocol e {
6+
associatedtype c struct f : d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::recordMatchCallArgumentResult(swift::constraints::ConstraintLocator*, swift::constraints::MatchCallArgumentResult)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
if
4+
case.a(a.b) = {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ProtocolConformanceRef::forAbstract(swift::Type, swift::ProtocolDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
var sixDoubles
4+
: Double "six has the value [\( ( sixDoubles \[]) }0 \0\0 \0 \sixDoubles)"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeBase::getSuperclassForDecl(swift::ClassDecl const*, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a {
4+
typealias b = c class e : a protocol d : e, d.b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"std::__1::pair<llvm::DenseMapIterator<swift::Identifier, unsigned int, llvm::DenseMapInfo<swift::Identifier, void>, llvm::detail::DenseMapPair<swift::Identifier, unsigned int>, false>, bool> llvm::DenseMapBase<llvm::SmallDenseMap<swift::Identifier, unsigned int, 8u, llvm::DenseMapInfo<swift::Identifier, void>, llvm::detail::DenseMapPair<swift::Identifier, unsigned int>>, swift::Identifier, unsigned int, llvm::DenseMapInfo<swift::Identifier, void>, llvm::detail::DenseMapPair<swift::Identifier, unsigned int>>::try_emplace<unsigned int const&>(swift::Identifier const&, unsigned int const&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
class a class b open extension b {
5+
@objc c : a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"createImplicitConstructor(swift::NominalTypeDecl*, ImplicitConstructorKind, swift::ASTContext&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a @propertyWrapper struct b < c {
4+
wrappedValue : c
5+
} @propertyWrapper struct d {
6+
var wrappedValue @b var e : a @d var f
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::constraints::ConstraintGraph::computeConnectedComponents(llvm::ArrayRef<swift::TypeVariableType*>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
let i = Array(... a { " ? \(i Array* )" }
4+
, b 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::GenericEnvironment::mapTypeIntoContext(swift::Type) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@abi(func a->b) func a < b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::SimpleRequest<swift::IsStaticRequest, bool (swift::FuncDecl*), (swift::RequestFlags)4>::noteCycleStep(swift::DiagnosticEngine&) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem distributed actor a{distributed...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::Decl::getLoc(bool) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@_typeEraser(a) protocol b dynamic func c->some b {
4+
d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::DerivedConformance::deriveDistributedActor(swift::ValueDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed typealias DefaultDistributedActorSystem = LocalTestingDistributedActorSystem distributed actor a{c, b
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// {"signature":"swift::constraints::ArrayLiteralToDictionaryConversionFailure::diagnoseAsError()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a<b{
4+
wrappedValue: b
5+
}
6+
@propertyWrapper struct c<b{
7+
wrappedValue: b
8+
}
9+
{
10+
@c @a var value = if true
11+
let : c<a<Bool>> = _value
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::DeclContext::getSelfInterfaceType() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
distributed func a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::BoundGenericType::getExpandedGenericArgs()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a func b [{ lazy var c = a(d var e = b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::PatternTypeRequest::evaluate(swift::Evaluator&, swift::ContextualPattern) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
@objcMembers class a open extension a {
5+
var b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::emitLoadedModuleTraceIfNeeded(swift::ModuleDecl*, swift::DependencyTracker*, swift::FrontendOptions const&, swift::InputFile const&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a {
4+
wrappedValue : b var projectedValue init(projectedValue c) {
5+
func d(@a Int) d
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::rewriting::RequirementMachine::checkCompletionResult(swift::rewriting::CompletionResult) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a : b protocol b{associatedtype c} protocol d : e,
4+
f protocol e
5+
: g where c : e protocol g : b protocol f : a where c : f
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// {"signature":"swift::EnumRawValuesRequest::evaluate(swift::Evaluator&, swift::EnumDecl*, swift::TypeResolutionStage) const"}
1+
// {"signature":"swift::TypeChecker::typesSatisfyConstraint(swift::Type, swift::Type, bool, swift::constraints::ConstraintKind, swift::DeclContext*, bool*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
func a<each b>(c : repeat each b) { repeat !(d c
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"signature":"swift::isOverrideBasedOnType(swift::ValueDecl const*, swift::Type, swift::ValueDecl const*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a < b {
4+
protocol c { associatedtype d init(e : d
5+
}
6+
class f {
7+
init(e : Int) {
8+
class 4 : f, c { init(e : d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"(anonymous namespace)::ASTScopeDeclConsumerForUnqualifiedLookup::consume(llvm::ArrayRef<swift::ValueDecl*>, swift::NullablePtr<swift::DeclContext>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
@abi(func a) var b : c
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"diagnoseDictionaryLiteralDuplicateKeyEntries(swift::Expr const*, swift::DeclContext const*)::DiagnoseWalker::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
[ 1.01: "" 1.01: ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::ExprPattern::updateMatchExpr(swift::Expr*) const::FindMatchOperatorDeclRef::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func ~= (a) if case ~= b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::TypeBase::getNominalParent()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a {
4+
typealias b<c> = () extension b
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"$s11swiftASTGen24evaluatePoundIfCondition10astContext13diagEnginePtr16sourceFileBuffer02ifF4Text14shouldEvaluateSiSo17BridgedASTContextV_SvSo0S9StringRefVAKSbtF"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: swift_swift_parser
4+
#if canImport(#available
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"formatDiagnosticArgument(llvm::StringRef, llvm::StringRef, llvm::ArrayRef<swift::DiagnosticArgument>, unsigned int, swift::DiagnosticFormatOptions, llvm::raw_ostream&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a func b(@a Int) b($c:d
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"isVanishingTupleConformance(swift::NormalProtocolConformance*, swift::SubstitutionMap)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a<b> = (repeat b)protocol c extension a : c
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::findSyntacticErrorForConsume(swift::ModuleDecl*, swift::SourceLoc, swift::Expr*, llvm::function_ref<swift::Type (swift::Expr*)>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a(consume : String) {
4+
consume consume consume
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::ResolvePattern::visitCallExpr(swift::CallExpr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
enum a { b : _const a
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"void swift::Diagnostic::gatherArgs<swift::Identifier, bool, swift::TypeRepr*>(swift::Identifier, bool, swift::TypeRepr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
@objcMembers class a open extension a {
5+
...
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::ABIDependencyEvaluator::computeABIDependenciesForModule(swift::ModuleDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a { init? { init!
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"getIsolationFromAttributes(swift::Decl const*, bool, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
isolated let a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ContextualFailure::getDiagnosticFor(swift::ContextualTypePurpose, swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{ struct a func b< c >->c->() var : (inout a)->() = b(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::PackExpansionType::PackExpansionType(swift::Type, swift::Type, swift::RecursiveTypeProperties, swift::ASTContext const*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
[Int : Int](Int) { a, b in a[b b= b * b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Parser::parseStorageRestrictionsAttribute(swift::SourceLoc, swift::SourceLoc)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@storageRestrictions(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::rewriting::RewriteSystem::processTypeDifference(swift::rewriting::TypeDifference const&, unsigned int, unsigned int, swift::rewriting::RewritePath const&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a < b class c<b, h> : a<(b, h)> protocol d {
4+
associatedtype b : c<e, f> associatedtype e associatedtype f associatedtype b
5+
: a<g>
6+
associatedtype g where g == e
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::adjustFunctionTypeForConcurrency(swift::AnyFunctionType*, swift::ValueDecl*, swift::DeclContext*, unsigned int, bool, llvm::function_ref<swift::Type (swift::AbstractClosureExpr const*)>, llvm::function_ref<bool (swift::ClosureExpr const*)>, llvm::function_ref<swift::Type (swift::Type)>)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
actor a func b(isolated a...) b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose<unsigned int, unsigned int, bool>(swift::SourceLoc, swift::Diag<unsigned int, unsigned int, bool>, swift::detail::PassArgument<unsigned int>::type, swift::detail::PassArgument<unsigned int>::type, swift::detail::PassArgument<bool>::type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
class b open extension b {
5+
@objc c : a

validation-test/compiler_crashers_2/c25aed95f6f6d937.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// {"signature":"Assertion failed: (detail::isPresent(Val) && \"dyn_cast on a non-existent value\"), function dyn_cast, file Casting.h, line 662."}
1+
// {"signature":"swift::TypeDecl::getName() const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
{
44
extension {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::diagnoseConstantArgumentRequirement(swift::Expr const*, swift::DeclContext const*)::ConstantReqCallWalker::walkToExprPre(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
@_semantics("oslog.requires_constant_arguments") func a(b) { a(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"getDirectWriteAccessStrategy(swift::AbstractStorageDecl const*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a(@_nonEphemeral UnsafeRawPointer) var arr { b a(&arr
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::ErrorType::get(swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@convention(c) _->Int
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::rewriting::RequirementMachine::buildRequirementsFromRules(llvm::ArrayRef<unsigned int>, llvm::ArrayRef<unsigned int>, llvm::ArrayRef<swift::GenericTypeParamType*>, bool, std::__1::vector<swift::Requirement, std::__1::allocator<swift::Requirement>>&, std::__1::vector<swift::ProtocolTypeAlias, std::__1::allocator<swift::ProtocolTypeAlias>>&) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a class b class c protocol d {
4+
associatedtype e where e : a, e : c, e : b
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::SubscriptMisuseFailure::diagnoseAsError()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
"" [.subscript
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::rewriting::performConcreteContraction(llvm::ArrayRef<swift::StructuralRequirement>, llvm::SmallVectorImpl<swift::StructuralRequirement>&, llvm::SmallVectorImpl<swift::rewriting::RequirementError>&, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
func a < each b, each c where(repeat(each c each b)) : {
4+
typealias d<each b> = () func e where d<repeat each b> ==
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"void llvm::function_ref<void (swift::Type)>::callback_fn<(anonymous namespace)::typeEraseOpenedArchetypes(swift::Type)::$_0>(long, swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
var a : String { get throws(b{
4+
a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::setType(swift::ASTNode, swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a let() = {(@a)in
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ast_scope::NodeAdder::visitBraceStmt(swift::BraceStmt*, swift::ast_scope::ASTScopeImpl*, swift::ast_scope::ScopeCreator&)::'lambda'(swift::ValueDecl*)::operator()(swift::ValueDecl*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
@abi(var a) subscript->
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::GenericTypeParamType::GenericTypeParamType(swift::GenericTypeParamDecl*, swift::RecursiveTypeProperties)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
typealias a = () extension a {
4+
typealias b<c> = () extension b
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// {"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&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a{associatedtype b} protocol c : RandomAccessCollection struct d < e
4+
: a,
5+
f {
6+
g {
7+
struct h : c {
8+
typealias i = e.b subscript(i) f
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// {"signature":"swift::QueryInterfaceTypeSubstitutions::operator()(swift::SubstitutableType*) const"}
1+
// {"signature":"(anonymous namespace)::TypeSubstituter::transformGenericTypeParamType(swift::GenericTypeParamType*, swift::TypePosition)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
extension Collection where Self : a {
44
struct Index protocol a
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::rewriting::PropertyBag::getAssociatedType(swift::Identifier)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol b : a{typealias a} protocol a : b {
4+
typealias a
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::rewriting::RewriteSystem::decomposeTermIntoConformanceRuleLeftHandSides(swift::rewriting::MutableTerm, llvm::SmallVectorImpl<unsigned int>&) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a{associatedtype b : c} protocol c { associatedtype d }
4+
struct e : a struct f < g : a, h : c where g.b.d == Int extension f where g == e

validation-test/compiler_crashers_2/issue-80657.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// {"signature":"(anonymous namespace)::Verifier::verifyChecked(swift::VarDecl*)"}
12
// RUN: not --crash %target-swift-frontend -emit-sil %s
23

34
// https://github.com/swiftlang/swift/issues/80657
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"$s11swiftASTGen15parseSourceFile6buffer10moduleName8filename14declContextPtr4kindSVSo16BridgedStringRefV_A2ISvSgSo0n9GenerateddE4KindVtF"}
2+
// RUN: not %target-swift-frontend -typecheck %s
3+
// REQUIRES: swift_swift_parser
4+
{
5+
a: (a $

0 commit comments

Comments
 (0)