Skip to content

Commit c3fc76f

Browse files
committed
[test] Add a few more known type-checker crashers
1 parent 61aa5a0 commit c3fc76f

File tree

8 files changed

+33
-1
lines changed

8 files changed

+33
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"cloneRawLiteralExpr(swift::ASTContext&, swift::LiteralExpr*)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
a enum a : Double { case = 3.7 case
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::NominalTypeDecl::lookupConformance(swift::ProtocolDecl*, llvm::SmallVectorImpl<swift::ProtocolConformance*>&) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
// REQUIRES: objc_interop
4+
@objc protocol a{a} extension a {
5+
a class b : a
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+
class a let _ a.init = 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// {"signature":"$s11swiftASTGen19addQueuedDiagnostic20queuedDiagnosticsPtr011perFrontende5StateH04text8severity4cLoc12categoryName17documentationPath015highlightRangesH0012numHighlightT013fixItsUntypedySv_SvSo16BridgedStringRefVSo0zE8SeverityVSo0z6SourceN0VA2NSPySo0Z15CharSourceRangeVGSgSiSo0Z8ArrayRefVtF"}
1+
// {"signature":"$s11swiftASTGen19addQueuedDiagnostic20queuedDiagnosticsPtr011perFrontende5StateH04text8severity4cLoc12categoryName17documentationPath015highlightRangesH0012numHighlightT013fixItsUntypedySv_SvSo16BridgedStringRefVSo0A0O0E4KindVSo0z6SourceN0VA2NSPySo0Z15CharSourceRangeVGSgSiSo0Z8ArrayRefVtF"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: swift_swift_parser
44
class a { @objc ( : ( b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"signature":"swift::CallerSideDefaultArgExprRequest::evaluate(swift::Evaluator&, swift::DefaultArgumentExpr*) const"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@expression macro a (() =
4+
#b)
5+
#a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::rewriting::RewriteContext::getProtocolComponentRec(swift::ProtocolDecl const*, llvm::SmallVectorImpl<swift::ProtocolDecl const*>&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
protocol a : b protocol b : c protocol d : a class c < e : d
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::constraints::ConstraintSystem::recordOpenedTypes(swift::constraints::ConstraintLocatorBuilder, llvm::SmallVectorImpl<std::__1::pair<swift::GenericTypeParamType*, swift::TypeVariableType*>>&, bool)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct b let c = { (a : b)in switch a { case .d(... e
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// {"signature":"createPropertyStoreOrCallSuperclassSetter(swift::AccessorDecl*, swift::Expr*, swift::AbstractStorageDecl*, (anonymous namespace)::TargetImpl, llvm::SmallVectorImpl<swift::ASTNode>&, swift::ASTContext&)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
@propertyWrapper struct a < b {
4+
wrappedValue : b static subscript<c>(_enclosingInstance d
5+
: c, wrapped e
6+
: ReferenceWritableKeyPath<c, b>
7+
storage f
8+
: ReferenceWritableKeyPath<c, Self>) Self
9+
} class g {
10+
@a h = 7

0 commit comments

Comments
 (0)