Skip to content

Commit a2f7d23

Browse files
committed
[test] Add some more known crashers
1 parent 4d1a04b commit a2f7d23

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"typecheck","original":"a275ad03","signature":"swift::Parser::parseTypeInlineArray(swift::SourceLoc)","signatureAssert":"Assertion failed: (Tok.is(K) && \"Consuming wrong token kind\"), function consumeToken"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
[a & 3 of
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"typecheck","original":"8e10a6ec","signature":"(anonymous namespace)::Verifier::verifyChecked(swift::IdentityExpr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a<b> {
4+
}
5+
func c<each d>(e: repeat a<each d>) {
6+
(try repeat each e)
7+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// {"kind":"typecheck","original":"5b785ef0","signature":"swift::ASTWalker::PreWalkResult<swift::Expr*> (anonymous namespace)::Verifier::dispatchVisitPreExpr<swift::OpenExistentialExpr*>(swift::OpenExistentialExpr*)","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
extension Dictionary {
4+
a(b: Sequence)
5+
{
6+
{
7+
for c d b {
8+
var values =
9+
[] ?? {
10+
values.append(c
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// {"kind":"emit-silgen","original":"941ad66b","signature":"swift::CanTypeWrapperTraits<swift::ReferenceStorageType>::type swift::SILType::castTo<swift::ReferenceStorageType>() const","signatureAssert":"Assertion failed: (isa<To>(Val) && \"cast<Ty>() argument of incompatible type!\"), function cast"}
2+
// RUN: not --crash %target-swift-frontend -emit-silgen %s
3+
@available(macOS 14.0, *)
4+
struct a<each b> {
5+
var c: (repeat each b) {
6+
(repeat {
7+
each c
8+
})
9+
}
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"typecheck","original":"e0be092d","signature":"swift::constraints::IgnoreAssignmentDestinationType::diagnoseForAmbiguity(llvm::ArrayRef<std::__1::pair<swift::constraints::Solution const*, swift::constraints::ConstraintFix const*>>) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
stride = (a:2).0

0 commit comments

Comments
 (0)