Skip to content

Commit ea63d04

Browse files
authored
Merge pull request #81866 from hamishknight/fuzzy
[test] Add a couple more known test-checker crashers
2 parents 214b8d8 + c81f0a8 commit ea63d04

9 files changed

+43
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// {"signature":"(anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a < each b : Collection {
4+
c : ( repeat each b
5+
extension
6+
struct Index {
7+
d : (repeat(each b.Index
8+
} var endIndex : Index {
9+
Index(d: repeat (each c).endIndex
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::OpaqueUnderlyingTypeChecker::check()"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
Array {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ast_scope::SpecializeAttributeScope::getSourceRangeOfThisASTNode(bool) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
{
4+
@in
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"signature":"swift::GenericEnvironment::getMappingIfPresent(swift::CanType) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a {
4+
struct b < each c {
5+
extension a {
6+
struct d {
7+
e(repeat(each c))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"(anonymous namespace)::DeclChecker::visitExtensionDecl(swift::ExtensionDecl*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
extension repeat (
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::CanTypeVisitor<swift::TypeMatcher<(anonymous namespace)::AssociatedTypeInference::getPotentialTypeWitnessesByMatchingTypes(swift::ValueDecl*, swift::ValueDecl*)::MatchVisitor>::MatchVisitor, bool, swift::Type, swift::Type>::visit(swift::CanType, swift::Type, swift::Type)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a { associatedtype b func c(_ : _ d: b }
4+
extension a { c(_ : _ d: b struct e : a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"signature":"swift::constraints::simplifyLocator(swift::ASTNode&, llvm::ArrayRef<swift::constraints::ConstraintLocator::PathElement>&, swift::SourceRange&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a { eq = "" b "Self ecuador1 Self) > Bool {
4+
let getProperties = (
5+
\.eq as Self -> _
6+
let eq = ""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"signature":"swift::ASTContext::getSpecializedConformance(swift::Type, swift::NormalProtocolConformance*, swift::SubstitutionMap)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a{ < } protocol b { associatedtype c : a where d == Self }
4+
class e<f> : a where f : b, f.c == e
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::ForeignRepresentationInfo::isRepresentableAsOptional() const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
a!!= 1

0 commit comments

Comments
 (0)