Skip to content

Commit 05ae4c4

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

File tree

66 files changed

+257
-3
lines changed

Some content is hidden

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

66 files changed

+257
-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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::Parser::parseDecl(bool, bool, llvm::function_ref<void (swift::Decl*)>, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
class a { class override ( override
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":"checkDistributedTargetResultType(swift::ValueDecl*, swift::Type, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: OS=macosx
4+
import Distributed protocol a:DistributedActor{distributed actor:
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)"

0 commit comments

Comments
 (0)