Skip to content

Commit 01f4a30

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

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

0 commit comments

Comments
 (0)